|
I'm having hard time with AddExplosionForce() as far as I can tell it has no effect or a negligent effect on the rigidbody. My scenario is of a top-down 2.5D game, so all rigidbodies have their position Y constrained. In my particular scenario an object explodes and I'm spawning fragments, then I want the fragments to be pushed by the explosion of the original object that blew up. So my code really is quite simple, a previous piece of code randomly created a few fragments around the object and the relevant piece of code is: If I replace the above code with the following: Essentially doing what AddExplosionForce() advertises, minus the torque, then things work as expected. I should note that the trigger for this piece of code is from an Update() and not a FixedUpdate(), but since I'm using a single call with ForceMode.Impulse and since ApplyForce() works I don't think that's the problem. Am I doing something glaringly stupid, or is there something wrong with AddExplosionForce() ?
(comments are locked)
|
|
I noticed it won't work without a collider attached.
(comments are locked)
|
