Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Can the center of gravity be changed?
Can the center of gravity be changed?
2000-10-25, 5:16 PM #1
Everthing that goes up must come down... but can we redefine "down"? I want the center of a 3do to be the center of gravity for a level... or for many sectors of a level. Is there a way to do that or closely simulate it? I'll work with others if they can come up with something.
2000-10-26, 8:50 AM #2
use sector thrust...no other way i can think of...
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2000-10-26, 11:51 AM #3
Hmmm... you could use the WoW cog to make it so you are always oriented correctly... then use applyForce to simulate gravity... but you would always jump 'up'. No, gravity is always DOWN, no center of gravity. Sorry.
2000-10-26, 11:56 AM #4
you could place a ghost in the center of your level, then use
gravVec = VectorSub(GetThinPos(player), GetThingPos(ghost));
to get the direction of the ghost relative to the player.

then use ApplyForce(player, gravVec); and if the vector is too strong you can always scale it or somthing...
I'm just an old man with a skooma problem.
2000-10-26, 1:13 PM #5
Gunboy...How does one place a ghost? Can I use the center of a 3do as the ghost position? What cog would I have to modify to get the desired effect?

Deathbane27... You say gravity must always pull down, but what is 'down'? What I would like to do is redefine what jk calls 'down'. Obviously there is something in a jkl file that tells the game which direction to pull objects that are affected by gravity, so there should be a way of telling the game to pull another direction right? Or there's always sector thrust.
2000-10-28, 3:11 PM #6
You place a ghost just like anything else. All objects in jk, 3d or 2d have a defined center. You can use the center of any object as a "ghost" point. A ghost object is simply an object used in jk that has no 3do attached to it so it doesn't appear and still has center because like I said all objects have a center, visible or not. You will find ghosts very useful in JK.

Hope that helped!

------------------
I've been through it all, creating a jedi league the the Gold Sabers and am known as The White Lightsaber for I always carry a white lightsaber for I am powerful in the force...
2000-10-28, 3:26 PM #7
Well, you can make it work for mots:
Code:
# Screwed up jumping cog by lordvader
# This cog not supported by LucasArts Entertainment Co.

symbols
thing player
thing center
vector push
cog me
message startup
message playeraction

startup:
player=GetLocalPlayerThing();
cog=GetSelfCog();
SetActionCog(cog);

playeraction:
if(GetParam(0)==0) // The player has jumped
   {
   push=VectorSub(GetThingPos(player), GetThingPos(center), 50);
   ReturnEx(1);
   }
end
Capitalization
Commas
Periods
Question Marks
Apostrophes
Confusable Words
Plague Words
2000-10-28, 5:28 PM #8
You cannot define what JK calls "down". The JK engine will always pull you negatively along the Z axis of the level. However you can set the level's gravity to zero and heed the previous suggestions on this thread. I think they'd work...

------------------
I dream in hardware-rendered SVGA!
In the deathmatch of life, there is a timelimit, but no fraglimit. :)

↑ Up to the top!