I'm wondering how to get full 3d movement out of my players view in an attempt to simulate being in space. I'm looking to come up with something similar to a simple version of Shattered Horizon's movement ([url]http://www.youtube.com/watch?v=NpD6pkA83k8[/url]). Obviously this would be for a zero-gravity environment.
I'm unsure where to start. Would attempting to create a custom Movement Controller for players be the correct path? Or maybe manipulating the view in other ways? Ive already attempted to get "SetAllowFullRotation" to work, but I see no effect what-so-ever when I enable/disable it.
Thanks
[url=http://www.youtube.com/watch?v=TSOf6YjO4Pc]Working on it.[/url]
But if you want to do a little experimenting of your own, the basic idea is you create a prop or something and then use Entity.SetParent and set the player's parent to the prop. From there, changing the angle of the prop will change the angle of the player.
You can't set the angle of the player? Seems a lot more efficient than parenting them to a prop.
[QUOTE=Lord Ned;26342497]You can't set the angle of the player? Seems a lot more efficient than parenting them to a prop.[/QUOTE]
Not as far as I know. Player entities are funky.
[QUOTE=Entoros;26342519]Not as far as I know. Player entities are funky.[/QUOTE]
*cough*[b][url=http://wiki.garrysmod.com/?title=Player.SetAllowFullRotation]Player.SetAllowFullRotation [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]*/cough*
Heh. "Setting this to true makes your player model rotate with your view, so if you look straight down your model will be face first on the ground. "
You'd have to override it's angles and come up with your own solution, but yeah it should work.
Where would you put that function in order to see an effect from it? I put it in the GM:PlayerInitialSpawn function, set it to true for all players, checked that it was set to true using GM:GetAllowFullRotation, and still nothing.
Also, I don't think this fixes the fact that the view is limited at +-180 degrees?
Thanks for all the responses, Celestia looks pretty interesting.
EDIT: Realized that I am probably not conceptualizing the effect that SetAllowFullRotation is supposed to have. Anybody happen to have a more detailed description/some sample code?
[QUOTE=EvanSch;26346137]Where would you put that function in order to see an effect from it? I put it in the GM:PlayerInitialSpawn function, set it to true for all players, checked that it was set to true using GM:GetAllowFullRotation, and still nothing.
Also, I don't think this fixes the fact that the view is limited at +-180 degrees?
Thanks for all the responses, Celestia looks pretty interesting.
EDIT: Realized that I am probably not conceptualizing the effect that SetAllowFullRotation is supposed to have. Anybody happen to have a more detailed description/some sample code?[/QUOTE]
I think all the model does is point your player model in the direction of your view, which wouldn't do anything in first person. Try going into 3rd person through console and see if it changes anything.
Sorry, you need to Log In to post a reply to this thread.