Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / sparky's camera collision

Author
Message
Patrick987
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 29th Aug 2009 04:46
i was wondering how to get a camera to collide with the objects in my game i found a thread on here that said to use SC_sphereCast ( Object, Oldx, Oldy, Oldz, X, Y, Z, Radius, Exclude_Obj ) but i dont know what i should change the oldx, oldy, and oldz values to
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 29th Aug 2009 05:12
I'd imagine the player's old x, y, and z values. So you'd want to save the values every frame to oldx, oldy, and oldz and put em there.
Patrick987
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 30th Aug 2009 06:19
lol im pretty new at this sorry but how exactly would i do that?
Patrick987
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 6th Sep 2009 19:48
any help would be greatly appreciated
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 6th Sep 2009 19:56
int cpx = CameraPositionX(0)
int cpy = CameraPositionY(0)
int cpz = CameraPositionZ(0)

that has integers

and then just fill that in your code like pok said.

SC_sphereCast ( Object, Oldx, Oldy, Oldz, X, Y, Z, Radius, Exclude_Obj )


Patrick987
15
Years of Service
User Offline
Joined: 22nd Jun 2009
Location:
Posted: 7th Sep 2009 04:12
ok thank you
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 7th Sep 2009 12:10
The camera position is float, not integer. Also the parameters to the SC_sphereCast function are floats, according to the header file.
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 7th Sep 2009 19:28
Quote: "The camera position is float, not integer."


Oops. Sorry about that.

Quote: "Also the parameters to the SC_sphereCast function are floats, according to the header file."


True, but i was only talking in theory.


Login to post a reply

Server time is: 2024-10-06 05:30:30
Your offset time is: 2024-10-06 05:30:30