Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pivot #70004
04/07/06 18:40
04/07/06 18:40
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
Hello

I have been using Blitz3d for some years before switching to 3dgs
Blitz supplies a nice features : pivot
You can create a pivot as parent entity and you make children entities turn around it
A smart tool indeed
Does 3dgs supply something similar ?
A combination of comands would be also fine
A reference to the (excellent) AUM would be also useful
Thanks in advance

Re: pivot [Re: Alberto] #70005
04/07/06 20:17
04/07/06 20:17
Joined: Jan 2003
Posts: 1,738
Nashua New Hampshire
anonymous_alcoho Offline
Senior Developer
anonymous_alcoho  Offline
Senior Developer

Joined: Jan 2003
Posts: 1,738
Nashua New Hampshire
One trick is to edit the model in med such that its origin is not centered on the model. For example, if you wanted a door, you'd move the door so that the origin is on the left or the right edge.


"Oh no, it's true! I'm a love magnet!" Calvin from Calvin and Hobbes My name's Anonymous_Alcoholic.
Re: pivot [Re: anonymous_alcoho] #70006
04/07/06 21:02
04/07/06 21:02
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
thanks

If so the distance beetwen the model and the new origin is constant
No problem for a door but suppose to have a character turning around something, but the distance is variable

Re: pivot [Re: Alberto] #70007
04/08/06 16:56
04/08/06 16:56
Joined: Aug 2005
Posts: 1,558
HK
V
vlau Offline
Serious User
vlau  Offline
Serious User
V

Joined: Aug 2005
Posts: 1,558
HK
It can be done in 3DGS but you have to write
some codes instead of a single command.

Code:

entity* someObject

var cbabe_dist = 100; // play with it
var cbabe_angle = 0;

// assign this action to cbabe, for example.
action cbabe_turn
{
while(my != NULL)
{
my.x = someObject.x + cbabe_dist * cos(cbabe_angle.pan);
my.y = someObject.y + cbabe_dist * sin(cbabe_angle.pan);
my.z = someObject.z;

cbabe_angle += 1 * time;
vec_set (temp.x, someObject.x);
vec_sub (temp.x, my.x);
vec_to_angle (my.pan, temp); // face the object
wait(1);
}
}

// assign action to some object
action someObject_act
{
someObject = my;
while(my != NULL)
{
my.y += (key_cul - key_cur) * 5 * time; // move your object around
my.x += (key_cuu - key_cud) * 5 * time;
wait(1);
}
}




Gamestudio download | chip programmers | 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