Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, Grant, valino), 3,361 guests, and 13 spiders.
Key: Admin, Global Mod, Mod
Newest Members
valino, juergenwue, VladMak, Geir, ondrej
19209 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problems with vec_rotate #67276
03/19/06 14:14
03/19/06 14:14
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
I'm baffled - in the code below the message is displayed but vec_rotate does nothing. Any ideas please?

var ct;
var direction [3] = 5,0,0;
var angle [3] = 10,0,0;
function block_f()
{
msg.string = "in here";
msg.visible = on;
ct = 0;
while(ct < 90)
{
vec_rotate (direction,angle);
ct += 10;
wait(1);
}
}
action block_a
{
my.enable_click = on;
my.event = block_f;
}

Re: problems with vec_rotate [Re: kiamonster] #67277
03/19/06 19:47
03/19/06 19:47
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
you are rotating the vector direction but what are you doing with direction to make it do something to make you think it should or shoudn't be changing?

i.e. you show no use of direction, other thn rotating it.

Re: problems with vec_rotate [Re: Grimber] #67278
03/19/06 21:11
03/19/06 21:11
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
Hi Gimber

Resalised this and have been trying to apply this vector without success.
How do I do it please?

Re: problems with vec_rotate [Re: kiamonster] #67279
03/20/06 01:29
03/20/06 01:29
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
im assuming your using dirction as a vector to calculate the entity facing direction?

function block_f()
{
msg.string = "in here";
msg.visible = on;
ct = 0;
while(ct < 90)
{
vec_rotate (direction,angle);
vec_to_angle(my.pan,direction.x);
ct += 10;
wait(1);
}
}

Last edited by Grimber; 03/20/06 01:31.
Re: problems with vec_rotate [Re: Grimber] #67280
03/21/06 13:48
03/21/06 13:48
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
I have now got vec_rotate to work but it seems inadequate - see my new posring please.

Re: problems with vec_rotate [Re: kiamonster] #67281
03/21/06 13:53
03/21/06 13:53
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
I've now got vec_rotate to work but it seems inadequate - see my recent posting on object rotation.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1