I have a .blend showing an exact copy of the objects that are in my game, but just simplified without any models. I have a head, a torso, rigs for the head and torso, and collision bounds along with the floor. The floor will act as a map. I am trying to have things collide with only certain things, but it doesn't seem to work. In my game, I need the collision bounds to only collide with the map. The head and torso should not collide with anything except projectiles (the floor in the .blend provided). The projectiles should collide only with the map and the character (head and torso). The .blend provided includes all the objects with names to help. Anything is appreciated, thank you!

EDIT: It seems like it does not work because of the parenting, I still need the parenting the way it is. Thus you need to make a script or do something in order to have the parenting not affect the collisions.

  • $\begingroup$ Can't you just move the different objects to different collision groups? $\endgroup$ – Feldpausch All4 Feb 28 '15 at 22:51
  • $\begingroup$ No one knows how to solve this? $\endgroup$ – blackhole Mar 4 '15 at 22:44
  • $\begingroup$ If you don't mind my asking, why are there two armatures for one object? I was also wondering why didn't use an Empty as the base for you item. I haven't really gotten around to playing with the game engine yet, so I don't know if there's an actual reason for using the boundary object as your base object. $\endgroup$ – Francisco Chavez-Tejeda Mar 5 '15 at 2:23
  • $\begingroup$ Well, I use more armatures for the mouselook. The mouselook is according to the rig, not the object. I use the bounds as the main object as it is the dynamic piece that is controlling everything when moving. It is not the collision bounds for bullets though, i.e. head and body. $\endgroup$ – blackhole Mar 5 '15 at 5:36
  • $\begingroup$ @BlenderDev you have an answer! quick! $\endgroup$ – Scalia Mar 6 '15 at 17:32

It was not necessary to change the parenting at all, or use python. Your main problem was that you had not checked the check box labeled Ghost

enter image description here

It is also important you change the settings for the collision group and the collision masks.

Basically the head and torso are on collision group 2 and are masked so that they can collide with Every Other collision group except for the first. This is because the ground is on the first.

The main collision group is set so that it can collide with everything Except for collision group 2, because the bullets are on that group.

enter image description here

Notice that ghost is Not checked on bounds. This is because it needs to be able to collide with the ground. It is masked so it can collide with everything except for collision group 2, because the bullets are in that group.

The last important change you need to make is on the bullets themselves.

This is on the same collision group as the torso and head, so they can collide with everything and not cause a problem. because the collision bounds object is on collision group 1, and because it is masked so that it can not detect collisions with the bullets, the bullets will pass through them harmlessly. However, the ground is also on collision group 1,

enter image description here

Using these methods, the end result is that the bullets can collide with the head and torso, the head and torso detect collisions with the bullets, and can decrease health/armor accordingly. The main physics object (bounds) can only collide with the ground. the bullets can also collide with the ground.

  • $\begingroup$ And how will the body collide with projectiles if its a ghost? $\endgroup$ – Scalia Mar 6 '15 at 17:28
  • $\begingroup$ Just a sensor. I see. $\endgroup$ – Scalia Mar 6 '15 at 17:30
  • $\begingroup$ Yeah, I wanted the bullets to actually collide with the body just in case for the future, I will vote up and accept but I hope you can fix. $\endgroup$ – blackhole Mar 7 '15 at 6:17
  • $\begingroup$ However, doing this will make your bullets no longer be able to react with the floor. $\endgroup$ – X-27 is done with the network Mar 8 '15 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.