objects collision

Hi,

I can’t use bricks to get the collision working.

So I have to use cubes. In the image below, I have a cube around the ship, and I have one around the enemy spider. If I parent the cube and the spider object the animation doesn’t work on the spider.

So the spider box must hit the ship box for it to be damaged or destroyed. I don’t think the spider needs a game property. How that works, I don’t know.

It is unfortunate that objects can’t simply be attached to another without using python code. I have some example code for spiders to attack a robot, but I don’t get it. How to get that to work, with the spiders being stationary.

Attachments


It is unfortunate that objects can’t simply be attached to another without using python code

ctrl+p

If I parent the cube and the spider object the animation doesn’t work on the spider.

parent spider armature to the cube, spider mesh to the armature.

look at your screenshot, do you see a fault there?
(static? no collision bounds?)

Use google/youtube search for hitbox or collision with hitbox, should bring up a quite amount of tutorials.
Also re-read your previous topics, i bet its explained there aswell.

Right, I’ve done that.

I’ve added the collision, and changed the physics type to Dynamic.

The spider is animated and it moves to the other box model, but does go through it. That was the same as before.

You’d think the game development book would contain something like a hitbox example. I’ll have a view of some tutorials on that.

did you do the same with the ship model? box collision/dynamic?

You’d think the game development book would contain something like a hitbox example

no idea, im self teached lol, google and a few questions on this forum. but i never had collision problems.

The idea is very simple, for every mesh/object with(out) an armature that needs collision i just do:
parent armature/object to a cube, the cube has dynamic and box collision (everything parented to that cube/armature has no collision). that’s all you need to let objects collide with eachother.

Only the boxes that are parented to their objects have the collision and and physics type set to dynamic.

Nothing has changed.

Am I still doing something wrong?

Attachments


Am I still doing something wrong?

yes, i guess so.

open a new file, add 2 cubes, set them as i told you and try, it works.
now you got a working example and can back trace your errors in the main file.

As for the hitbox? That is the cubes right?