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.

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 15th Aug 2011 17:37 Edited at: 15th Aug 2011 17:46
i found this code with search options


my functions are BezierMake and SetupBezier when i try to use BezierMake function it doesn't make a correct bezier curve instead it makes one that is made by default from BezierRnd function, and how can i change position object 1 and so to use find free object() function every time i try that with this functions it return an error like object already exists or such? can someone help me with this? original code for this was done by monocoder.
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 13:04
this isn't solved yet does anyone knows how to fix this?
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 16th Aug 2011 13:32 Edited at: 16th Aug 2011 13:36
Don't know what is wrong with your code, but I can provide you with a 2d and 3d bezier curve function:


Example of the curve attached.
Mugen Wizardry
User Banned
Posted: 16th Aug 2011 16:09
Now is there any way you could get an OBJECT to follow the 3D Bezier Curve, is the question?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 16:48
this is original code that i used from code snippets


can anyone get this to work like my BezierMake function

@Max P
see attached screenshot can you change your code so it actually look like bezier curve, and how can i make camera or object follow your bezier curve?

@Mugen Wizardry
yes it is possible to get camera to follow bezier curve (with the original code), that is not the problem, the problem is that i can't generate bezier curve of my own.
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 16th Aug 2011 17:26
Here it is:

It only supports 1 active bezier at the time though.
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 18:04
ok, that helped but how can i move camera or object along the curve? i am not sure how to do this
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 16th Aug 2011 18:31
Using this code:

t=0 is the beginning of the curve,
t=100 is the end.
To move it from the start to the end use
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 21:31
i modified your code into this but it crashes when camera reaches the end of curve



can you help?
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 16th Aug 2011 21:35
The position can't go past 100, 100 is the end of the curve.
In your code it goes to 1000.
change

to
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 16th Aug 2011 22:41
ok thanks
Mugen Wizardry
User Banned
Posted: 17th Aug 2011 00:03
How can we enhance this code to have all the length we want, and still not lag?

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 17th Aug 2011 11:32
Increase the quality value in the function, or use curvevalue when moving your camera.
A quality of 2 will give only some points, where a quality of 100 gives a lot of points.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Sep 2011 16:05 Edited at: 6th Sep 2011 16:07
Hi.. I have replaced my bezier curve for my program with the one above. Instead of using a camera I place objects at the bezier locations. But I can't figure out the rotation angles for my objects so that they bend in the directions of the bezier curves. The example when you press space bar doesn't rotate the boxes, so can anyone tell me how to do that please.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Sep 2011 18:53
This nearly works at rotating the object with the curve...

rotate object t,0,0,wrapvalue(0+object position x(t)- object position y(t))

But I don't think it will work very well.

Mugen Wizardry
User Banned
Posted: 6th Sep 2011 18:54
i'd like to know the answer to this too!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Sep 2011 19:15
The simplest way is to point your object at a point further along the curve, it worked for me...



Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Sep 2011 19:17
I tried pointing it to the next point, maybe I should have tried further away. I'll try it.

Mugen Wizardry
User Banned
Posted: 6th Sep 2011 19:21
Hey Batvink, do you think you could release this example's source code so everyone can study it? That would be GREAT! And I, and others appreciate it I'm sure!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 6th Sep 2011 19:47
I put a dummy limb on, and pointed it 3 places ahead, and that worked thanks!

Mugen Wizardry
User Banned
Posted: 11th Sep 2011 14:40
Hey Batvink, can you release that code from the Youtube video so everyone can study it? Or an example like it?

Thanks!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !

Login to post a reply

Server time is: 2026-07-11 06:26:04
Your offset time is: 2026-07-11 06:26:04