Making the character follow a function w Created 17 years ago2006-11-17 05:11:45 UTC by Netserk Netserk

Created 17 years ago2006-11-17 05:11:45 UTC by Netserk Netserk

Posted 17 years ago2006-11-17 05:11:45 UTC Post #202973
I am making some kind of a platform sidescroller game in source. So far I have moved the camera to thirdperson so it is placed perpendicular to the character 1000 units away so the character is seen from the side. The character controlled by the player is some kind of a plane which can only move left, right, up and down. At the moment when the character-plane moves left and right it follows a straight line. I want the the plane to follow a predefined function (for example a Sinus curve) instead of just a straight line.

I hope you understand what my problem is. Another way to describe what I want is to make the character follow a function when he moves forward instead of just moving straigt ahead.

What is the easiest way to solve this.
Posted 17 years ago2006-11-18 08:09:59 UTC Post #203112
I would assume this would be handled through movement code, specifically, the jump section. I would assume implementing curves for movement would involve a simple mathematical formula and a bit of code tweaking and replacement; unfortunately I know little about the Source codebase myself. You might be better off at the VALVe Wiki or HL2World.
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 17 years ago2006-11-27 07:22:47 UTC Post #204219
hmm I dont know what to do
Posted 17 years ago2006-11-27 08:14:09 UTC Post #204222
http://www.antfarmsource.com/

These guys offer a cheap way to do: they've supplied the code for the character movement and the camera, all you have to do is sandwich the character between clip brushes. It may give you what you want...
AJ AJGlorious Overlord
You must be logged in to post a response.