Talk:Blender 3D: Noob to Pro/Platformer: Physics Fixes

Lokiclock, I don't understand why you created a new plane for the touch sensor. Why not just add a property to the existing floor and use that?

Also, what sort of problems are you having with jumping? The tutorial isn't very clear beyond the part about jumping in mid-air. There are non-pythonic solutions to some problems posed by the game engine (although not many!)... this might be one of them.

-> (Non-Python) Possible solution to jumping:

1) Give all ground objects an identical property (say "ground")

2) Create a cube under the player (about the size/location of the jumping limits) and parent it to said player--the cube must not be touching the player. Bad things happen with constant ghost collision, namely slowing the game down a lot.

3) Make cube ghost

4) Give cube a collision sensor for property ground

5) Connect cube collision sensor to jump controller (make it an "AND" controller)

-Note: You should probably make the jump-cube an inverted pyramid (longer on the z axis) depending on how you want jumping to be restricted. This would make it so you couldn't jump off walls unless they were directly below you, or very close to you (thus the up-side down pyramid).

Malaz


 * The problem arises later on that you can jump infinitely in mid-air. So you have to link it to a collision with some ground object. If you just link it to the cubes, you end up being able to jump while touching any side of the cube, not just the top. You can still kind of jump while being almost on the collision platforms and not having to necessarily be on top of them, which is the problem I could not solve within the engine. I am not sure your jump-cube pyramid would to the trick. I suppose it's worth a shot. You'd have to make the cube send a message that the player requires as a jump condition, because I don't think you could have the jump cube's collision connect directly to the player's jump business. Loki Clock (talk) 09:02, 11 March 2008 (UTC)


 * Actually, you can just directly link the collision sensor (of the jump-pyramid) to the jumping controller. You just have to select both the pyramid and the player, then you can link between objects. --Malaz (talk) 00:40, 12 March 2008 (UTC)


 * A much simpler way is to simply use a -Z ray sensor, rather than the whole pyramid-collision thing. It works just as well with a bit of tweaking, and is probably faster.--207.81.49.53 (talk) 19:04, 25 March 2008 (UTC)