Gamestudio Links
Zorro Links
Newest Posts
Rendering PANEL only in a specific VIEW
by alibaba
16 minutes 19 seconds ago
Ahead bias when retrain
by JRA
Today at 10:32
[LBGUI] Memory not released!
by alibaba
Today at 02:11
Votes for future features
by easyX
Yesterday at 19:30
New Zorro version 1.83
by jcl
Yesterday at 14:21
What are you working on?
by Emre
Yesterday at 01:21
Experienced 2D|3D Character artist|Concept Artist@ Indie Prices|
by DeathstalkerArs
05/21/18 17:13
AUM Magazine
Latest Screens
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Who's Online
15 registered (AndrewAMD, Mafia_IR, alibaba, JRA, CocaCola, 3run, kvm, mk_1, Akow, 3 invisible), 440 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
AgentShark, rpauletto, tuuPaul, LaserJock2000, andrey20
17959 Registered Users
Topic Options
Rate This Topic
#464957 - 03/20/17 13:43 Keeping distance
Realspawn Offline
Expert

Registered: 07/13/01
Posts: 4799
Loc: netherlands
I have astroids in my game that use the same pointer what would
be the best way so they always stay on a certain distance from
each other ?

Thank you for your time laugh
_________________________
Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain

Top
#464959 - 03/20/17 14:34 Re: Keeping distance [Re: Realspawn]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1803
Loc: Netherlands
How do you move your asteroids?
If you move them through e.g. c_move, you can just increase the bounding box your asteroids (scale than c_setminmax than shrink to original size , or just vec_scale min_x and max_x manually). Also setting the GLIDE flag in your c_move function helps (also take a look at move_friction in the manual).

A better way perhaps would be adding a EVENT_IMPACT to your asteroids that when they make contact with each other (e.g. through c_move) they move away from each other (just compare the positions of both asteroids to calculate the velocity you want and e.g. save these in the asteriods' skills and than in the asteroid's c_move use these skill values).

Another way but maybe overkill solution would be implementing a flocking system.



Edited by Reconnoiter (03/20/17 14:37)

Top
#464961 - 03/20/17 16:06 Re: Keeping distance [Re: Reconnoiter]
Realspawn Offline
Expert

Registered: 07/13/01
Posts: 4799
Loc: netherlands
There not moving but appear at random places
that impact sounds like a solution i will toy with it some more.
i fixed the issue thx for pointing me in the right direction laugh



Edited by Realspawn (03/20/17 16:10)
_________________________
Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain

Top


Moderator:  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

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