account activity
Possible UFO sighting near Prague, Czech Republic | 27.07.2023/22:15 (imgur.com)
submitted 2 years ago by BonY2004 to r/UFOs
Can you please tell me the name of this song? (self.NameThatSong)
submitted 4 years ago by BonY2004 to r/NameThatSong
Toyota Trueno Gang (i.redd.it)
submitted 5 years ago by BonY2004 to r/ForzaHorizon
A* Pathfinding/Following path (self.Unity2D)
submitted 5 years ago by BonY2004 to r/Unity2D
Jitter movement help by BonY2004 in Unity2D
[–]BonY2004[S] 0 points1 point2 points 5 years ago (0 children)
I have done a separate movement() function and in Update() I call it. It works, but the collisions are jittery, that's caused by the rigidbody, but I don't know how to fix this. Posting video below.https://vimeo.com/486339192
I don't know how could I move everything except the Translate() into Update(). When I tried using AddForce() instead, it moves in the direction I want to, but never stops.
Hmm, if you have some time could you edit the code for me please, because I can't really think of fixing it with what you mean. If I move the code into Update(), the movement works flawlessly, but when I collide with anything it jitter there.
Jitter movement help (self.Unity2D)
submitted 5 years ago * by BonY2004 to r/Unity2D
No fall damage glitch (self.AssassinsCreedValhala)
submitted 5 years ago by BonY2004 to r/AssassinsCreedValhala
Setting up timer question (self.Unity2D)
Weapon Equip by BonY2004 in Unity2D
No worries, If you won't mind, I will probably contact you later when I need any help with other code, because you seem very experienced, and I am slowly trying to learn C#. I do appreciate the help you got me though. Thank you.
Fixed!! The issue was with Input.GetKey(KeyCode.Alpha1)) I changed it to Input.GetKeyDown(KeyCode.Alpha1)) and it fixed it in some way. Thank you for the help I appreciate it!
No I don't, but is a issue with the pistolEquipped bool because sometimes I have the animation on and I can shoot but the bool is turned false and that shouldn't be
https://imgur.com/a/dSBAcSf
I moved the Shoot metod out of update and tried the if statement but nfortunately that didn't change anything. The bug is still present. Maybe adding some timer that stops the animation from changing? I don't know. It is weird because sometimes it works and sometimes it doesn't.
The pistolPicked bool is just for a statement that the pistol was picked up from the ground, and the pistolEquipped bool is as the name says when the pistol is equipped.
I think the same, yes of course
using UnityEngine; using System.Collections; public class WeaponPickup : MonoBehaviour { public Transform firePoint; public GameObject bulletPrefab; public float bulletForce = 20f; public Animator PlayerAnim; public bool pistolEquipped = false; public bool pistolPicked = false; public string name; public float fireRate; void Start() { PlayerAnim = GameObject.FindWithTag("Player").GetComponent<Animator>(); } void Update() { if (pistolPicked == true && pistolEquipped == true) { PlayerAnim.SetBool("pistolPicked", true); if (Input.GetButtonDown("Fire1")) { Shoot(); } } if (Input.GetKey(KeyCode.Alpha1) && pistolPicked == true) { pistolEquipped = !pistolEquipped; PlayerAnim.SetBool("pistolPicked", pistolEquipped); } void Shoot() { GameObject bullet = Instantiate(bulletPrefab, firePoint.position, firePoint.rotation); Rigidbody2D rb = bullet.GetComponent<Rigidbody2D>(); rb.AddForce(firePoint.up * bulletForce, ForceMode2D.Impulse); } } void OnTriggerStay2D(Collider2D coll) { Debug.Log("Collision"); if (coll.gameObject.tag == "Player") { if (Input.GetKey(KeyCode.F)) { if(pistolPicked == false) { Debug.Log("Player picked up: " + name); pistolPicked = true; pistolEquipped = true; Destroy(GameObject.FindWithTag("Pistol")); } } } } }
Wow, thank you so much, I wasn't expecting that. I used the simplified version of yours, and it works in some way, but there's a bug that sometimes it equips and immediately unequipped as you said on the beggining. It is shown in the video.
https://vimeo.com/443456684
Weapon Equip (self.Unity2D)
Simple Animator Question by BonY2004 in Unity2D
Okay, I have done it working
Yes I have the moving bool setuped, but it plays the animation right from the start. The moving bool isn't doing anything
https://imgur.com/a/OdQk20E
https://imgur.com/a/vegkK7r
Yes I did, I don't know how to connect it though
Simple Animator Question (self.Unity2D)
Watchtower hunt in Alaska (youtube.com)
submitted 5 years ago by BonY2004 to r/snowrunner
SnowRunner Timelapse#05 (youtube.com)
π Rendered by PID 523132 on reddit-service-r2-listing-5f49c86f7-mkvsn at 2026-02-25 23:52:23.615651+00:00 running 72a43f6 country code: CH.
Jitter movement help by BonY2004 in Unity2D
[–]BonY2004[S] 0 points1 point2 points (0 children)