Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Alex Pires |
Hello my friends!
I’m developing my first 3D game, and I’m very happy with the results, but some unexpected behavior is worrying me:
The laser beam shot by the hero is pushing the enemies under certain circunstances (jump, cumulative shots, etc). Damn… it’s a laser beam and not a brick.(^_^)
I want to hear from you what can be done to avoid this. I want to remove the mass of the laser beam, but keeping it’s movement and collision.
Thank you in advance.
P.s.: Sorry about my english. Shame on me.
Beam (Rigid Body) <— Maybe this…
---- Collision Shape <— or this…
---- MeshInstance
Enemy (KinematicBody)
CollisionShape
---- Armature
Skeleton
MeshInstance
AnimationPlayer
Hi, i assume you have already changed mass attribute from rigidbody to zero. So the next suggestion i imagine is using kinematicbody instead of rigidbody for beam. Is there any reazon to use rigidbody?
p7f | 2018-12-26 13:21
Hello p7f! Thank you for the answer. There was a reason for me to use the rigidbody, it’s innapropriate, I know (all the physics stuff), but when I tried to use kinematicBody, the enemies instances was desappearing with the laser beam(queue_free). So I’ve decided to left as is. Another point is that the rigidBody mass don’t go to absolute zero. It went to 0.01 and keeping the same behavior. Now I considered using Area as SIsilicon wrote and it works like a charm.
Alex Pires | 2018-12-27 21:51
Yes, i don’t know what i was thinkgin when i said kinematicbody… i always use area for my bullets and etc. If the answer provided by @SIsilicon works, you may select it as best so other see its resolved!
p7f | 2018-12-27 21:56
Ok. Selected! This golden tip will help some beginners since the 3D demo example provided uses something like a ball shoot, and this is a little bit confusing.
Alex Pires | 2018-12-27 22:19