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 / offset limb, sync and position camera at limb coordinates

Author
Message
Ben_UK78
16
Years of Service
User Offline
Joined: 10th Jul 2010
Location:
Posted: 21st Apr 2011 08:45
Hi all,

I am getting a strange issue.

If I offset a limb and then try and position the camera at the limb coordinates sometimes I need to call sync between the two, i.e

dec camval1, zoomfactor1
offset limb camera_object, 2, 0, camval1, 0
fastsync
position camera limb position x(camera_object, 2), >> limb y, z etc
point camera object position z(camera_object), position y, z etc


If the code does not have the sync in the middle then the limb rotation is lost and the camera just sticks up in the air at the camval1 offset.

Elsewhere in the code I rotate the object and rotate the limb and place the camera at the limbs new coordinates and it all works fine. It just seems to be something to do with offsetting it perhaps.

Any help would be appreciated.

(obviously the above is not my real code )
The camera object is made like so:

make object plain camera_object, 0.1, 0.1
add limb camera_object, 1, dot_mesh
add limb camera_object, 2, dot_mesh
link limb camera_object, 1, 2

The camera_object is not hidden as I found this stops the limb rotations etc from working, so its just too small to see.
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Apr 2011 08:53
Ben, I am not getting the same results you're describing. The camera positions work just fine without requiring a sync. Also (I haven't tested it in a while), I have never come across an issue with hidden objects or limbs preventing limb rotation from working. If you can demonstrate a case where a hidden object's limb rotation is not working, I'd say that's a reportable bug.

Here's my test code if you want to give this a try to see how it matches with your code.



If this is not helping to resolve the problem, I suggest taking a moment to write a short snippet (like the one above) that demonstrates the issue(s) with the code. This way folks have more to work with to assist. Also, when I put together a code snippet to demonstrate the problem, I often find the problem and don't need to post for an assist.

Login to post a reply

Server time is: 2026-07-18 06:41:17
Your offset time is: 2026-07-18 06:41:17