Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 29th, 2010, 07:39 AM
neonfish neonfish is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 3 neonfish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 14 sec
Reputation Power: 0
Ruby scripting a movement in engine

y
Hello

Im a ruby beginner.And I am trying to animate something in a simple 3d engine which has a ruby binding available.So
you can utilize some loaded models in the engine to move, blink etc.I ve managed to blink,to rotate and to move a
loaded model.The scene you will see is basicaly a globe model with the texture of the sky on it in the middle is a ground model with a grass texture.There is a road juncion model and a car on the road.I m asking for help or litle guidance because Im stuck in this one.Basicaly I m trying to create a turning movement (method) for an object(car or anything else).{A very basic

movement with no physics involved) .To be able to take a turn on a junction for example in any way.

If I send you the

basic engine and my scripts along with the models could you please help me with this? I am not or maybe the

philosophy behind of the programming of this kind of a movement.AS I uderstand you are creating scripts in Ruby

for Google Sketchup.So maybe you can help me in this.

#####The files####

You can run my basic script with the start.bat. The models and the configuration files are in DATA and DATA\Vila directory there is also the *rb fle which creates the whole scene.

there is a simple blinking script and a simple movemetn script aslo a rotation script. But Im not able to do a

movement along a curve.MAybe a bazier curve or something with that? hoping for help.


files awailable for download

"put zshare site name here"/download/73810106b9303da5/

"put megaupload site name here"/?d=G0ZVI4KU

"put rapidsahre site name here"/files/364471302/enginescriptmodels.zip.html


"put deposit files site name here"/files/3s62cdaka


have a nice day

NeoNF

Reply With Quote
  #2  
Old March 29th, 2010, 11:14 AM
L7Sqr L7Sqr is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Constant Limbo
Posts: 989 L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 22 h 45 m 6 sec
Reputation Power: 362
Send a message via AIM to L7Sqr
This is not a factory; we do not churn out solutions to compensate for your lack of effort. Should you insist on treating this like a factory you will have to offer up compensation to the employees.
__________________
True happiness is not getting what you want, it's wanting what you've already got.

My Blog

Reply With Quote
  #3  
Old March 30th, 2010, 01:03 AM
neonfish neonfish is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 3 neonfish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by L7Sqr
This is not a factory; we do not churn out solutions to compensate for your lack of effort. Should you insist on treating this like a factory you will have to offer up compensation to the employees.



Hi I am not treating you as a factory.Askling for direction help, toughts way of approach.I ve uploaded the files.There are the script and methodts I ve already done.I did not postet code samples because it has some specifics.You need to see the script file to understand that.

I ve managed to make a turning movement with the combination of a movemetnt forward and rotation but it looks very ugly I ve combined 3 movement(move forward) sequentions with changet parameters + rotatation and the whle turning action consumed 3 steps and looks pretty ugly I would send the code but to see the result you need to paste into the script and start up my scene. IF you really need to see a bit of code as equivalence of effort here it is.

Code:
if ($scene_id==0) then 

  if(MoveObject1($auto1,0,-1,0,6)) then $scene_count=0;      $scene_id=1;    
end 
end

  if ($scene_id==1) then  if(CameraDirection($auto1,1,1,-25,30))||(MoveObject2($auto1,-0.4,-0.35,0,6)) then $scene_count=0;      $scene_id=2;  
  end
end
i
f ($scene_id==2) then   

 if(CameraDirection($auto1,1,1,0,1))||(MoveObject2($auto1,-1,0,0,2)) then $scene_count=0;      $scene_id=3;   

end 

end




MoveObject = moves object in given direction
CameraDirection = is for camera orientation but it can be aplied on any object (model) in the engine.

and scene Id is self explanatory if scene 1 is done skip to scene 2 etc....


But as I ve mantioned IT is not the best solution SO I am asking for help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > Ruby scripting a movement in engine

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap