Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Camera collision #424401
06/14/13 21:50
06/14/13 21:50
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
I am trying to make the camera that follows behind my player character not go behind walls. For example, lets say I rotate my character next to a wall (with the camera behind the character, facing where the character is facing). Instead of moving along the wall and constantly viewing the character's back (even closing up to the character's back if need be), the camera goes behind the wall instead, so that I cannot see my character's back, or where the character is facing; only the other side of the wall that my character is next to.

Does anyone know of a function or technique to have the camera behind the character move along walls as the character turns, instead of go through them, so that I can always see character's back and facing direction at all times?

Last edited by Ruben; 06/14/13 21:52.
Re: Camera collision [Re: Ruben] #424402
06/14/13 21:59
06/14/13 21:59
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
This question as well as your last one are better off in the "Starting with Gamestudio" section.

What you can do is trace from the player position to the wanted/ calculated camera position and if trace_hit then set the camera at the target location (or a little closer to the player).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Camera collision [Re: Superku] #424405
06/15/13 00:02
06/15/13 00:02

M
Malice
Unregistered
Malice
Unregistered
M



Superku's post is the common way I do it. This is covered many times a year on the forum and I'm sure the AUM has answered it a bunch also And maybe the wiki. Try building a function and if you have problems with it then start a new post in the section Superku told you about and someone will probably try and help. You will get better replys if you post the code to a function and ask for help then asking someone to build a function for you.

@Superku - Just wondering if you have ever placed the camera inside a invisible entity and used c_move and GLIDE and a little logic. Just curious before testing if there is major flaw with this method.

EDIT - Thanks Superku

Last edited by Malice; 06/15/13 00:08.
Re: Camera collision [Re: ] #424406
06/15/13 00:06
06/15/13 00:06
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Many many years ago I've used an entity and c_move for this but it does not have any advantages (at least I cannot think of any) over using a c_trace (optionally with USE_BOX) method.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1