Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the ambiera forums
Does anyone know of a good technique to make a player character move along the correct path? I had the level be where it just goes straight to the right. Now I'm redesigning it and it goes to the right then turns and goes back to normal then loops around (and there will be more of this later). I can't just move straight along the X-axis like I normally do.
Thanks .
It's a side scroller rendered in 3D like Kirby 64.
This is the path that he follows now, the red line shows his path and the black is platforms.
And this is what it should be.
The way I've saw this coded before was as a line of node. Every point on the movement axis is either a node or in-between 2 nodes. You then only have to keep track of progression on said line to know your orientation. Look at heightmap, it'll give you some help.
Yeah that could be a good way. Would a trail of flat planes work so that I could move the character forward and the rotation of the character changes depending on the normal the raycast hit? Or is that inefficient?
Grumpymonkey is right. The best way I can think of is a node-based path. You can use splines if you want it to be extremely smooth. Interpolating between the points makes everything blend together. The camera will of course be rotated to face the current point between two nodes where the character is, and the location of the camera can be determined using cross products.