WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-05-2008, 04:04 PM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Body linking

Hi,
I'm developing a training environment where the user must operate a fork lift truck and be able to get on and off. I have set up the fork lift using physics joints and motors so that it "behaves" correctly, which it does-to a certain, pretty much.
Firstly when I pick up the objects with the forks that need loading and stacking (cages made with collideBox's top and bottom) there is a noticeable 'wobble', to the point when it looks unrealistic. Is this a trade off of using a bunch of dynamic physics shapes held together with physics joints?
Secondly when linking the viewpoint to the fork lift I loose control of the head, I presume it is the head_ori that is linked is it? I have tried using setMask but to no avail.I have tried using this:
Code:
#TIMER
def onTimer(num):
#    #The timer with the id 'num' has expired
    if num == 0:
        #Link matrix of runners to forks(turning)
        turn = run.getMatrix()
        turn.preTrans(0,1.6,0)
        view.setMatrix(turn,viz.BODY_ORI)
        
viz.callback(viz.TIMER_EVENT,onTimer)
viz.starttimer(0,viz.FASTEST_EXPIRATION,viz.FOREVER)
which does what I want but produces REALLY bad juddering when the truck is moving.

Am I missing something really simple here?

Regards

Nige
Reply With Quote
  #2  
Old 03-06-2008, 09:05 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Update

Hi all wizards,

Juddering experienced whilst moving has been improved by tweaking setStepSize and setAccuracy, although it is not perfect (yet), and the cages still cause the forks to wobble, I am more confident that I can achieve acceptable results.

Take it easy
Reply With Quote
  #3  
Old 03-06-2008, 09:27 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The following code should link to rotation of the fork lift to the view body:
Code:
bodyLink = viz.link(forkLift,viz.MainView,mask=viz.LINK_ORI,dstFlag=viz.LINK_BODY)
Reply With Quote
  #4  
Old 03-06-2008, 02:17 PM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Nice 1

Cheers man,

ended up using
Code:
bodyLink = viz.link(body,view,dstFlag=viz.LINK_BODY)
as the exact line of code you gave me only linked the orientation of the body(or head?) i think as the view didn't move with the truck, but hey, thanks again for your help.

Regards,
Nige
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
scaling avatar's body parts shai Vizard 4 03-03-2008 08:35 AM
separating heads from body for complete-characters.com vAlexia Vizard 0 09-18-2006 11:10 AM
translating viewpoint along body orientation cade_mccall Vizard 3 08-29-2006 09:35 AM
problems adding a custom morph head to a custom body Greenwu Vizard 1 07-27-2006 10:32 AM
Linking avatar 'bones' to a position tracker. zachhendershot Vizard 3 11-19-2003 09:26 PM


All times are GMT -7. The time now is 03:58 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC