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.

Newcomers AppGameKit Corner / 3rdPersonCam with Pivot - Why isn't this working..(help anyone?)

Author
Message
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 4th Feb 2018 19:14 Edited at: 5th Feb 2018 20:55
Hi guys,

I've added a pivot for the cam to have more flexibility, so that the camera is able to look up all the way.
For instance near a building without it going through the floor:


Or all the way down, for instance near a cliff.


It then goes over the player's head and looks down (can see your own toes):



But I ran into 2 mysterious issues:

ISSUE 1: I've noticed in V6.0 that the campivot is *not* in the expected location behind the player,
but tends to live a life of it's own
, can see it on the left drifting away into the distance(see circled area).
This even though the camera itself is working fine, is behind the player as intended.
The other players haven't not moved yet, so there the campivot is still in place(see arrows).

How can the campivot *not* be in the correct x,y,z while the camera attached to this campivot *is* in the correct location behind the player??


ISSUE 2: In V6.1 I've also modified the UpdatePlayer() function into UpdatePlayer(locPlr as integer), for being able to control multiple players using types and arrays through the same code.

For instance in v6.0 it looks like this:


As can be seen I'm using the fields of the player type in V6.1.;


Why after converting all of the player references to it's type x,y,z fields, are the collisions behaving erratic and is the player at times reseting position to 0,0,0. ?




I can't seem to figure out why. Hopefully someone can shed some light on this, for I'm ready to pull my hair out. Any help is much appreciated.

I've included simplified cut down versions below in code boxes, but also as download for convenience.
Download(both versions): [url=http://www.mediafire.com/file/zh5w053gjxikb5e/Univ3D_1%263P_Framework.rar]http://www.mediafire.com/file/zh5w053gjxikb5e/Univ3D_1%263P_Framework.rar
[/url]
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 4th Feb 2018 19:19 Edited at: 5th Feb 2018 20:36
[continued]

version 6.0 - campivot not working properly
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 4th Feb 2018 19:50 Edited at: 5th Feb 2018 20:34
[continued]

version 6.1 - collisions not working properly

Login to post a reply

Server time is: 2024-05-03 02:42:38
Your offset time is: 2024-05-03 02:42:38