Obstacle simulation visualization

Those this work. I have been trying to visualization the obstacle simulation to understand its behavior been it doesn’t work. Is it a bug or what?

And If you know or have a script that can make an object avoid an obstacle, please share i need it as well

Here you have an example:


Obstacles.zip (109.5 KB)

1 Like

@john_hamilton made a good tutorial for it a while back. Most of it is still compatible with UPBGE 0.3+ with the exception of a few different UI category names.

1 Like

Can it be done with only python code?

Do you Know hot to do the exact thing but with python code?

For some reason, this script will not work at runtime but it runnable in the Text Editor. It will activate the game physic option Create Obstacle for any object that has a game-property called OBSTACLE.
Note: Feel free to tweak the name of the game-property the script should search for.

image

import bpy

for o in bpy.data.objects:
    if "OBSTACLE" in o.game.properties:
        o.game.use_obstacle_create = True
1 Like

I can’t seem to get the velocity of an object with “character” physics. Is it a bug or what?

Here is the line of code…
Print(Own.getLinearVelocity())

It prints 3 vectors with their values being 0.00 each even when the object is moving.
I tried the code again, but this time it’s physics was set to “static” and the code worked.

My main coal is to check which axis the object moved. Just like in the movement sensor but in Python. Ain’t wanna use sensors just script

I already provided a solution about this particular subject last month. Not sure if you saw it.