Collisions and character property for the physics

Hi,

Okay, I was reading the game engine book, decided to view the collision and object property. Dynamic isn’t recommended, but rigid body is for moving objects?

I used a cube for the character, a long rectangle.

I tried rigid body and dynamic, they aren’t good, I tried static that stopped the character from falling through the fall. Character doesn’t so anything to solve that, the enemy AI they sort of fly a little bit around if they crash into the side of the level. I have them on dynamic.

According to the game engine book, dynamic isn’t recommended for character, or player. :neutral_face:

Okay this image displays the physics, so no idea, the floor plane doesn’t change using any physics option. The player only can remain on the floor with a static option.

I wouldn’t of thought my character, and the level was that bad it won’t even function at the least to stay still unless moving. :roll_eyes:

This is how most people do collisions proxys -

[IN DESCENDING ORDER]

(A mesh modeled to roughly define your player’s collision)
[PLAYER COLLISION] + [PARENT] + [RIGID BODY]

(A mesh that is your character’s visual body)
[PLAYER BODY] + [CHILD] + [NO COLLISION]

[NOTES]
Player body is parented to Player collision.
That way you see the body but it has no collision.

Player collision has collision for the body + Player controls like Movement.

Would it best to simply join every object instead of a parent setup, which is what I have? And then the model is parented to the rectangle, so that is the collision object for the character.

[EXAMPLE OF COLLISION HAZARDS]

Worst thing you could do for collision, is have a high-poly model for collision.
Imagine colliding with a 3D model that has 100,000 vertices, which would mean calculation for 100,000 points in 3D space! :scream:
Avoid high-poly collision at all costs :slight_smile: :+1:

You could do that :thinking:
If all the children have no collision then there isn’t any collision calculations.
It would mean less work for the Scenegraph (scene rendering) tho, since there would be less objects.
But if it saves you time in things like modeling, then it’s not really an issue as long as it’s still useful to you.

So what is the plan to solve this falling down character, I join all objects where possible, and then what do I apply to it? character or rigid body? Must be character?

I did delete a few left over vertices, and faces that weren’t a part of the exterior.

Oh my goodness, if I’d had known you were trying to find a solution to this from the start I would have given you this solution -

Properties Window --> Physics (Rigid Body type) --> (Find option Lock Rotation) check X & Y buttons.

This will prevent your (Rigid Body)Player collision from toppling over due to gravity :slight_smile:

Also, if you need a solution to prevent the Player from sliding on steep slopes, feel free to ask me for help.

I tried a number of ways, joined everything, then that suggestion doesn’t do anything. The character goes through everything with everything locked. I tried joining the walls, collision, nothing.

I also tried just using the model itself, prior to the above, it solved the problem of not falling down.

I switched on collision for this arch wall.

This is rubbish. Join pieces or not? Make difference I guess.

With character, and collision on for the walls, now that works, but the character is floating above the floor.

Collision not aligned here.

Could be that no collision was on the character or the other objects which caused all of that sinking. I felt like the joining file was just a waste of time, I did improve that just a little, but having the un joined version is better. I am not sure if this has been solved.

What is all of this? Where the arch is, the character gets stuck, whether the character is programmed to go to a location, not very well, or move the character through the level.

Some sort of map of the object. Sensor?

Uh, I will translate as best as I can from the crazy image . . .

  1. The white sphere on the left is from a radar or near sensor.
  2. The red-line on the floor is because you have Steering actuator option Visualize on.
  3. Everything else is normal collisions visualizations.

Bad collisions, I can’t really help you here, except to say model the collision mesh better :neutral_face:

So the arch model object is the problem? Could scaling them, may be change the collision.

I did the best I could with what I knew at the time of making them.

As for targeting, I am not sure what I can do with this, I wanted to make this new file a little more interesting, weapon effects, and sparks aren’t going to work, so there is blood effect, possible music, and may be restore the AI sound effect. And possibly add a sound file for the character.

Definitely lacking view of the front robot and AI, so another camera view possible. By default as is, looking forward, another camera view looking back would certainly be better.

At the moment, controlling the character works best, and a little more ineractive. So the character must shoot the AI and keep moving to avoid being hit by the AI. So it pretty much a mission complete once Ai has been removed.

Anything more would need python code. I am thinking I can may be pull this off as it is. I could add a start screen. Hmm.

And yes i knew about the red line. I turned that on that was the character end point, that was the intention when i first created the file, the robot goes to one location, but how it would work to end or complete once there or AI first and then complete, I never got anywhere with it, due to the collision problems. I then gave up on the file.

If you are talking about physics performance |YES|
Any kind-of hard physics calculation (like getting stuck between 2 or more collision areas) adds to the physics calculation, & that takes more CPU time which leads to game-lag due to Blender still trying to calculate things.

The spark effect did work, I scaled it down, and it does appear when shooting at an AI, it is tricky, this was a new file. But again tricky with this one, as the camera angle is an annoyance.

1 Like

I tried scaling the arches, height and width. Nothing.

I tried removing faces, I also removed one arch, and I scaled another part of the level to keep it in one place, and tried to equal it out. I also made sure origin was move to the geometry instead of to the grid.

Not looking smooth at all. The level isn’t working for the character.

Yay! :slight_smile:

Since you don’t use Python I can’t say use ray-casts.
Ray-Casts are lasers sent from a Ray Sensor.
You can make the lasers produce Enemy Damage when in contact with an Enemy Entity.

Are you sure your Player collision can even fit through the arch-doorway?

Well the spark effect in one file was named on the actual box surrounding the AI. I will need to check that out in the other file, I didn’t name it on the box.

As for the collision, well when controlling the character, spin around and it gets through the area where there was one arch and I removed it. So I don’t know what it could be. It isn’t all the arches that block the character.

Could the floor be a problem? separate pieces not joined together? They are even.

Make sure all our objects have a scale of 1.0, otherwise any scale other then 1.0, say - 0.0055422 is very confusing to BGE :slight_smile:

If you want to take a drastic chance . . .
Give me the blend file in PM & will work on it when I have time (I promise I won’t plagiarism or give anything away.

Scale of 1.0, where is that exactly?

Thank you for offering, what I have made isn’t worth anything. Obviously I spent sometime on it, probably would if it was AAA game quality or what ever they call it.

:eyes: . . . . . . Ok . . .

3D View --> [T KEY] (This opens the toolbox panel) --> Scale (This is the selected entities Size)

Scale (1.0,1.0,1.0) is the default numbers.