Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Model stay's on model
Topic Started: Sep 14 2012, 09:10 PM (477 Views)
svenotje1
Advanced Member
[ *  *  * ]
Hello, i want that how you turn with the player that it doesn't matter and evey time you turn my other object turn with it. i mean in simple words think you have a circle whit a arrow on it the your turn the circle 70 degrees then turn's the arrow 70 degrees to and point at the same point of the circle as the begin.

Pictures: arrow begin: Posted Image
arrow 70 degrees(watch at the red dot): Posted Image

Thanx,

Sven
Offline Profile Quote Post Goto Top
 
PoniesForPeace
Member Avatar
Elite Member
[ *  *  *  * ]
use bones or lengthdir
favorite soda: oogave agave watermelon Cream

favorite cheese: blueberry winsledale

Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
I don't understand can you explain whit some more information?

I tested this but it won't work:
Code:
 

if (step<2*pi){
step += 0.1;
}else{
step = 0;
}
var dir;
dir = obj_player.roty
var xx,yy;
xx = x+lengthdir_x(45,dir-90)+obj_player.x;
yy = y+lengthdir_y(45,dir-90+obj_player.y+10);
xx += lengthdir_x(10*sin(step),dir);
yy += lengthdir_y(10*sin(step),dir);
x=xx
y=yy
Step();
Edited by svenotje1, Sep 17 2012, 07:32 PM.
Offline Profile Quote Post Goto Top
 
PoniesForPeace
Member Avatar
Elite Member
[ *  *  *  * ]
if (step<2*pi){
step += 0.1;
}else{
step = 0;
}
var dir;
dir = obj_player.roty
var xx,yy;
xx = x+lengthdir_x(45,dir-90)+obj_player.x;
yy = y+lengthdir_y(45,dir-90+obj_player.y+10);
xx += lengthdir_x(10*sin(step),dir);
yy += lengthdir_y(10*sin(step),dir);
x=xx
y=yy
Step();
favorite soda: oogave agave watermelon Cream

favorite cheese: blueberry winsledale

Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Now i have:
Code:
 

if (step<2*pi){
step += 0.1;
}else{
step = 0;
}
var dir;
dir = obj_player.roty
var xx,yy;
xx = x+lengthdir_x(45,dir-90)+obj_player.x;
yy = y+lengthdir_y(45,dir-90)+obj_player.y+10;
xx += lengthdir_x(10*sin(step),dir);
yy += lengthdir_y(10*sin(step),dir);
x=xx
y=yy
Step();

but it still don't work
Offline Profile Quote Post Goto Top
 
alexmach1
Member Avatar
Graphics addict
[ *  *  *  *  *  * ]
edit: I have no idea what you are trying to achieve, so here's some code

Code:
 
x=obj_player.x-sin(degtorad(-obj_player.roty))*(-10);
y=obj_player.y+cos(degtorad(-obj_player.roty))*(-10);
Edited by alexmach1, Sep 18 2012, 01:51 AM.
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
You don't understand what i'm doing me neither. But thanx this helps alot
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Only one thing

I want that the x is 30 pixel last then it is now. but when i do this:

Code:
 

x=obj_player.x-sin(degtorad(+30-obj_player.roty))*(-3);
y=obj_player.y+cos(degtorad(-obj_player.roty))*(-3);
roty=obj_player.roty-180;

it begin to spin around when i turn.
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Bump
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Buuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuummmmmmmmmmmmmmmmmmmmmmmmmmmmmmmpppppp

Can anybody help me :think:
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
svenotje1
Sep 19 2012, 05:59 PM
Only one thing

I want that the x is 30 pixel last then it is now. but when i do this:

Code:
 

x=obj_player.x-sin(degtorad(+30-obj_player.roty))*(-3);
y=obj_player.y+cos(degtorad(-obj_player.roty))*(-3);
roty=obj_player.roty-180;

it begin to spin around when i turn.
Anyone :blink:
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
svenotje1
Nov 13 2012, 07:17 PM
svenotje1
Sep 19 2012, 05:59 PM
Only one thing

I want that the x is 30 pixel last then it is now. but when i do this:

Code:
 

x=obj_player.x-sin(degtorad(+30-obj_player.roty))*(-3);
y=obj_player.y+cos(degtorad(-obj_player.roty))*(-3);
roty=obj_player.roty-180;

it begin to spin around when i turn.
Anyone :blink:
You can PM me in Dutch (if you are Dutch), I'm afraid your English is not very understandable.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
I did
Offline Profile Quote Post Goto Top
 
Reikyrr
Forum God
[ *  *  *  *  *  * ]
I did not get it.
~Inspirational quote~
Offline Profile Quote Post Goto Top
 
svenotje1
Advanced Member
[ *  *  * ]
Ik heb opnieuw gemaild
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply