Position camera always behind player

Have any questions or problems in making your game, subscribing and/or using our software? Post here.
Forum rules
Make sure you are using the newest version. This can be downloaded at the top of the site via the "downloads" link.

Use a very good subject. "Problem" or "Help" are unacceptable titles.

Use the search feature before posting a question, as the answer is probably already here.

Subscript out of range error 9: This is a generic error, and we'll need way more information than that to figure out the problem. If you get this, strongly consider following the instructions of submitting your project through the Submit Bug feature within the editor.
OohmBalaGames
Junior Member
 
Joined: Thu Sep 07, 2017 12:41 pm

Position camera always behind player

Postby OohmBalaGames » Fri Sep 15, 2017 5:43 am

Is it possible to position the camera so that it is always behind the player?
Just keep swimming ...

User avatar
noeneto123
001 Support
 
Joined: Sat Apr 16, 2011 11:39 am
Location: Brazil

Re: Position camera always behind player

Postby noeneto123 » Fri Sep 15, 2017 3:53 pm

For 2D or 3D games? Definitely is possible, but is different for each perspective

OohmBalaGames
Junior Member
 
Joined: Thu Sep 07, 2017 12:41 pm

Re: Position camera always behind player

Postby OohmBalaGames » Fri Sep 15, 2017 6:29 pm

noeneto123 wrote:For 2D or 3D games? Definitely is possible, but is different for each perspective


3D Perspective :)
Just keep swimming ...

User avatar
noeneto123
001 Support
 
Joined: Sat Apr 16, 2011 11:39 am
Location: Brazil

Re: Position camera always behind player

Postby noeneto123 » Fri Sep 15, 2017 6:57 pm

Are you talking about shoulder camera? It is a little bit hard to do but I can send here the necessary script, I already did it a time ago

OohmBalaGames
Junior Member
 
Joined: Thu Sep 07, 2017 12:41 pm

Re: Position camera always behind player

Postby OohmBalaGames » Sat Sep 16, 2017 5:06 am

noeneto123 wrote:Are you talking about shoulder camera? It is a little bit hard to do but I can send here the necessary script, I already did it a time ago


If you can send that, it'd be amazing :D Thank you! :)
Just keep swimming ...

User avatar
noeneto123
001 Support
 
Joined: Sat Apr 16, 2011 11:39 am
Location: Brazil

Re: Position camera always behind player

Postby noeneto123 » Sat Sep 16, 2017 12:05 pm


Here it is!

To make use of it you must create 2 global variables:

cam_sen : camera sensibility, you can use 100 for default value
dist : distance from character, you can use 64 for default value

I placed the camera at the right shoulder, to invert it you may use negative value in dist variable.

After make the global variables you must place a timer in HUD interface with 0.01s delay, and place all the script in "every time" trigger.

Let me know if anything works bad! :)


Return to Technical Support Questions

Who is online

Users browsing this forum: No registered users

cron