# sin movement

 03 March 2006 hvanzon harm van zon | ONESIZE   portfolio Harm van Zon 3d Artist onesize Tilburg, Netherlands sin movement im trying to make an object move in a sin wave (in z up down) when you move it in a direction (y for example) with wire parameters. i tried connecting them with: x_postion*sin(80) but it moved i a straight line. i cant figures out what i do wrong sry for my noobness __________________ www.onesize.nl ----------------- Yeah right! sure... share quote
 03 March 2006 FaceMn Veteran Jason Hayes Technical Artist THQ / Volition, Inc. USA You need to also adjust the y or z position. Here is a basic sine wave example: ``````wave_amplitude = 60 wave_width = 10 x_position = 0 for i = 1 to 360 do ( y_position = sin(x_position) * amplitude x_position += wave_width -- or time, whatever obj.pos.y = y_position obj.pos.x = x_position )`````` I'm sure there might be more simple examples, but this is just off the top of my head. __________________ ______________________ Jason Hayes Technical Artist THQ/Volition share quote
 03 March 2006 hvanzon harm van zon | ONESIZE   portfolio Harm van Zon 3d Artist onesize Tilburg, Netherlands it says: imcompatible types: 0,0 and undifined tnx for the help and im gonna study the expressions tuts, cos im kinda new to the whole scripting thing. But i think i have to learn it, cos it helps animating things faster. __________________ www.onesize.nl ----------------- Yeah right! sure... share quote
 03 March 2006 Aearon Lord of the posts   Kai Stavginski Bum / Full-Time Houdini Apprentice Madrid, España hvanzon i got it to work the way it was suggested in your other thread, the cube sat on it's corner when at 45°, and on it's side when at 90°, but inbetween it didn't work out right, it didn't really stick to the floor when close to 45 it may be i did something wrong but my guess is the the sin stuff may not be enough __________________ Kai Stavginski www.Aearon.de "There's nothing to it but to do it!" share quote
 03 March 2006 hvanzon harm van zon | ONESIZE   portfolio Harm van Zon 3d Artist onesize Tilburg, Netherlands Aeron your absolutely right. It isnt a sin, cos or whatever. i made the movement and it comes to this. Is this doable or is it real hard? __________________ www.onesize.nl ----------------- Yeah right! sure... share quote
 03 March 2006 hvanzon harm van zon | ONESIZE   portfolio Harm van Zon 3d Artist onesize Tilburg, Netherlands btw your Dependency Graph Beta is really cool. __________________ www.onesize.nl ----------------- Yeah right! sure... share quote
 03 March 2006 Aearon Lord of the posts   Kai Stavginski Bum / Full-Time Houdini Apprentice Madrid, España thanks man, most of the work is really done by kees' amazing helium plugin, it's just fun scripting on top of that thing, i hope i'll find the time to work some more on this soon as for this rolling cube thing, actually if you look at it it sure is a circular movement (the path is a quarter of a circle, so coming up with an acurate formula for this should definitely be possible (for someone who know's how to come up with formula's) __________________ Kai Stavginski www.Aearon.de "There's nothing to it but to do it!" share quote
 03 March 2006 CGTalk Moderation Expert Thread automatically closed This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum. __________________ CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. share 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 vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.