Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Pivot #70091
04/08/06 10:48
04/08/06 10:48
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
hello

What about a "pivot" feature Blitz3d Like ?
I have been using Blitz for years and I found it really so helpful

Re: Pivot [Re: Alberto] #70092
04/08/06 11:16
04/08/06 11:16

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Describe, please? What is it about and what does it do?

Re: Pivot #70093
04/08/06 11:43
04/08/06 11:43
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
You create an invisible entiy called "pivot" as a parent then you attach children entities to it
For example in a solar sustem the pivot can be the sun origin while the earth is a child
You rotate the pivot and the earth turns around the sun
This is a simple example but beleive me it is a powerful tool
In an other thread I have been suggested to move in MED the center of the model
It can work for a door, for example, but it is not a general purpose solution

Re: Pivot [Re: Alberto] #70094
04/09/06 02:42
04/09/06 02:42
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
You can do the same thing using vec_rotate. 3DGS doesn't allow you to organise your entities into parent-child heirachies, so you will have to manage that yourself.

An example of rotating something about a point:

Code:

action orbit
{
var angular_velocity[3];
vec_set(angular_velocity, vector(5,0,0); //5 degrees pan per tick


while(my)
{
//velocity to pivot
vec_set(temp,angular_velocity);
vec_scale(temp, time);

//length and direction of vector to rotate
vec_diff(temp2, my.x, parent_entity.x );

//rotate it
vec_rotate(temp2, temp);

//add it back to the parent entity's position
vec_add(temp2, parent_entity.x);
vec_set(my.x, temp2);

wait(1);
}

}



Untested, but should do the job.


EDIT>>> Actually ,that would just rotate the object around the level origin. You need to find the length and direction of the parent entity to the child, rotate that around the origin then put it back. I have changed the above code to do this.

Yes, a single command that does all that would be convenient.


Last edited by A.Russell; 04/09/06 03:44.
Re: Pivot [Re: A.Russell] #70095
04/09/06 08:07
04/09/06 08:07
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
3DGS doesn't allow you to organise your entities into parent-child heirachies,

Thanks , it is an important feature anyway
As I said I have been using it a lot in Blitz3d
Can it be implemented also in 3dsg in the future ?

Re: Pivot [Re: Alberto] #70096
04/09/06 14:52
04/09/06 14:52
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
You can do it yourself. Set an entity skill for a pointer to the parent and another for any children.

With respect, this isn't Blitz3d, so although that may be your frame of reference for how 3d engines work, you'll have to get used to the way the engine you are working with handles things or just stick with one engine that you know.

Re: Pivot [Re: A.Russell] #70097
04/09/06 15:13
04/09/06 15:13
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
No offence but this is a silly answer

Re: Pivot [Re: Alberto] #70098
04/09/06 16:09
04/09/06 16:09
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Quote:

No offence but this is a silly answer




No, this:
Quote:

You can do it yourself. Set an entity skill for a pointer to the parent and another for any children.





is a very good solution...

Re: Pivot [Re: oliver2s] #70099
04/09/06 16:25
04/09/06 16:25
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
I referred to Russel's comment not to his solution

Re: Pivot [Re: Alberto] #70100
04/09/06 16:38
04/09/06 16:38
Joined: Oct 2003
Posts: 246
A
Alberto Offline OP
Member
Alberto  Offline OP
Member
A

Joined: Oct 2003
Posts: 246
I have been also surprised of Russel's, in my opinion silly answer because he himself in his previous post said

"Yes, a single command that does all that would be convenient "

The sub title of the "future" thread is "suggestion..."
and then ?

Page 1 of 2 1 2

Moderated by  aztec, Spirit 

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