WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-12-2009, 02:35 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
Hey, been a while since you posted this example for me farshizzio - been busy busy busy with a literature review / search since then so I have only just got back to finishing this project off!!

I have (fairly) successfully implemented yr slider motor class & it works great THANKS, however, I still have a couple of problems that I would like to run past u :-

- How could I replace the keyboard control event for joystick buttons? I was using a timer to look for a joy.isButtonDown event but seem unable figure out a way of using this method with yr wonderful SliderMotor class!
- When lowering the forks sometimes the item that I was carrying (cages or pallets) get 'stuck' in thin air and only drop if they get knocked by the forks - have tried various combinations of settings for 'setStepSize' and 'setAccuracy' but nothing seems to help that much!
Here is the code for the cages:
Code:
top =cage1.collideBox(node = 'Cage_Top',bounce=0)
top.setFriction(0.5)
bottom = cage1.collideBox(node = 'Cage_Bottom',bounce=0)
bottom.setFriction(0.5)
side1=cage1.collideBox(node='Left_Ones',bounce=0)
side2=cage1.collideBox(node='Right_Ones',bounce=0)
cage1.enable(viz.COLLIDE_NOTIFY)
-the pallets are dealt with in a similar manner.

The forklift is a purely physics based affair rather than being based upon animations or links (as I had already mentioned last yr), with the blades of the fork lift being dealt with like this:
Code:
fork1 = flt.getChild('Blades')
forks = fork1.collideBox(bounce=0)
fork1.enable(viz.COLLIDE_NOTIFY)
forks.setFriction(1)
What, in your opinion, would be the best approach to sort this out? I would REALLY appreciate any light you may be able to throw on this problem,

Thanks in advance
Reply With Quote
 


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


All times are GMT -7. The time now is 06:13 AM.


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