I’ve been using blender for about 2-3 years now, and I’ve decided I’d give the game engine a try, so I’m a bit of a noob as far as python scripting and logic gates go.
I’m trying to adjust the character’s collision bounds when the ray sensor detects a certain object. I used the “Edit Object” actuator and set it to a Plane object. I’ve tested this in a quick test scene, and it works on static objects. But for some reason it doesn’t work on character objects. These are my physics settings http://puu.sh/akowR/582766038f.png
If anybody knows a way around this, I’d appreciate a response.
I don’t what the standard solution for this is, but I was assuming that by replacing the mesh you could have control over material physics. But to no avail. Maybe I’m doing something wrong.
The player needs to be able to jump through so the platforms can’t be solid. I wouldn’t play with changing solid/ghost types in-game if that’s even possible.
Rather I would make it so that platforms are static ghosts and player rayCasts down from the bottom lelft and right corner of his physbox and detects the platform via property match. If there’s a result from either rayCast apply upwards force equal to your gravity.
The only way I know of to make Static objects Ghost, is to Ghost parent them to an object. To change back to solid, you have to do the same thing but without the Ghost option enabled (both Python setParent() and Parent Actuator).
But could anyone confirm if material physics are not changeable during the game?
Like I said, the Edit Object: Replace Mesh actuator works on all static objects, so it’s basically a ghost toggle if you use it correctly, but I want it to work on Character or Dynamic objects as it would be more universal and make level design easier.
Jump_Through_Platform.blend (462 KB) Well, for now, this is the best I can do. It’s not difficult, but it’s time consuming when you have to do this to every single platform in the scene.