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.

DarkBASIC Professional Discussion / Question About Set Camera To Follow and Object Importing

Author
Message
MateiSoft Romania
11
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Jan 2015 13:33
Hello community,

Why the camera's point of view is changed when an object exists in the scene the Z axis is disturbed and it points up or down depends on the object imported in the scene and it does not follow the main object properly.

Thank You!

P.S if you want the codes just say it!

Alex Matei CEO
www.alexmatei.com
WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 3rd Jan 2015 19:13 Edited at: 3rd Jan 2015 19:14
autocam off
MateiSoft Romania
11
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Jan 2015 19:24
it is off

Alex Matei CEO
www.alexmatei.com
WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 3rd Jan 2015 19:30
May require code then.
WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 3rd Jan 2015 19:45 Edited at: 3rd Jan 2015 19:49
Disregard.
MateiSoft Romania
11
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Jan 2015 20:12
This is the whole code




Alex Matei CEO
www.alexmatei.com
WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 3rd Jan 2015 22:05 Edited at: 3rd Jan 2015 22:08
Due to the fact that to move forward you are moving in the negative direction, tells me your object default orientation is not correct. However that is not the issue, as you seem to have adjusted for that. You have based the angle on the objects y rotation. This value holds no relation to how the object is orientated. The last parameter you have set to 25, this is a flag - 0=no collision correction 1=collision correction. See if this works.

MateiSoft Romania
11
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 3rd Jan 2015 22:38
Well this code that you gave me doesnt track the character quite well it faces the wrong direction and it doesnt track its Y angle i mean the camera does not rotating in the Y axis along with the character and the problem still persists with the height of the camera's angle.



Alex Matei CEO
www.alexmatei.com
WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 3rd Jan 2015 23:06
I guess the angle does relate to the objects y rotation. The only thing I see wrong is the objects orientation. Try rotating it on the y axis 180 degree’s and fixing the pivot. Obviously you will need the change the sign on the move object functions and not add or subtract 180 from the angle. With the code supplied that’s about all I can suggest.
MateiSoft Romania
11
Years of Service
User Offline
Joined: 16th Oct 2013
Location:
Posted: 4th Jan 2015 11:26
I think i found why the camera was not facing in the right direction is because when i am placing the editor camera upwards or downward and entering the function that has the code set camera to follow, it will face the way that i last pointed the camera it will not automatically point to the object. I thought that set camera to follow was automatically pointing to the object, i tried also manually to point the camera(manually from code) point camera 0, but no result...

Alex Matei CEO
www.alexmatei.com

Login to post a reply

Server time is: 2025-05-11 10:44:33
Your offset time is: 2025-05-11 10:44:33