View Full Version : Changing Gravity
Yamato
11-28-2007, 05:40 PM
I am new to creating content and have a question about the Unreal Editor. I'm trying to build a map and would like to know if there is a way to change the gravity of the level. If so, how do you do it?
u could add a gravity volume around your whole map and set the gravityZ to watever grav u want
UTMutator_LowGrav.uc
// Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
class UTMutator_LowGrav extends UTMutator;
/** Gravity along Z axis applied to objects in physics volumes which had default gravity. */
var() float GravityZ;
function InitMutator(string Options, out string ErrorMessage)
{
WorldInfo.WorldGravityZ = GravityZ;
Super.InitMutator(Options, ErrorMessage);
}
defaultproperties
{
GravityZ=-100.000000
GroupNames(0)="JUMPING"
Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTMutato r:Sprite'
ObjectArchetype=SpriteComponent'UTGame.Default__UT Mutator:Sprite'
End Object
Components(0)=Sprite
Name="Default__UTMutator_LowGrav"
ObjectArchetype=UTMutator'UTGame.Default__UTMutato r'
}
Yamato
11-30-2007, 02:00 PM
Thanx for the help :)
Guru7892
12-02-2007, 02:39 AM
hey, I have a couple of gravity questions...
could you set muliple volumes overlapping each other? (one large volume of low grav, and then a high grav inside)
could you use other buffers (like X and Z) to create directional gravity?
it looks like you can.
can these gravity volumes be set to move and rotate?
fatbob
02-01-2009, 11:26 AM
Hey, i'm new here and was looking for any suggestions related to this topic.
I'm fairly new to Unreal 3, but for a University project have decided to try and replicate a few M. C. Escher works within Unreal Ed, specifically Escher's Relativity.
Have read the previous posts and found them interesting, but wondered if anyone with a bit more experience than me had any tips for how to localise gravity at various points within the level?
For example aligning the gravity to the various stairway meshes so thet you could walk at various orthogonal angles within the cube like courtyard.
Any suggestions would be much appreciated, and would help me loads!
http://upload.wikimedia.org/wikipedia/en/a/a3/Escher's_Relativity.jpg
Thanks again, Chris :)
ambershee
02-01-2009, 05:47 PM
The answer is no, it just can't be done.
Escher's work is also a lot more than simple gravity.
fatbob
02-01-2009, 07:59 PM
When you say no, do you mean that different gravity 'zones' at different orientations are not possible at all in UE? Or do you mean, it isn't possible to mimic the many gravity wells within Relativity to the detail of each staircase.
Which leads to my following question, how would you go about mimicing something similar to this?
And/or does anyone know if this sort of thing is possible in something like Source engine?
Thanks again for your help. Chris
Wagman
02-01-2009, 10:07 PM
@ fatbob:
maybe you could do it so when you reach the end of the set of stairs, it reloads a new level. (or a new set of stairs that corresponds to the level)
basicaly your just tricking people :D
fatbob
02-02-2009, 07:19 AM
Yeah, I had thought about instancing the courtyard scene a number of times, rotating the 'cubes' and aligning the doors from different sections, so it would look like you were entering another door into the same scene.
Angel_Mapper
02-02-2009, 01:48 PM
Yep, this is officially the new White Viewport question.
ambershee
02-02-2009, 03:53 PM
I'll say 0_o
When you say no, do you mean that different gravity 'zones' at different orientations are not possible at all in UE? Or do you mean, it isn't possible to mimic the many gravity wells within Relativity to the detail of each staircase.
Which leads to my following question, how would you go about mimicing something similar to this?
And/or does anyone know if this sort of thing is possible in something like Source engine?
Thanks again for your help. Chris
Source can't do it well either, although taking a look at Portals portals may reveal something. UT2004, and UT can however fake it with clever use of Warp Zones (portals). These don't exist in UT3, so the only other technique is going to need a lot of code - either using rotating rooms (only works in singleplayer, and prevents you using any 'moving' parts or complex geometry) - or you can use a REALLY code heavy version and start re-writing game objects from the ground up with respect to not using the game 'gravity' direction - which may or may not even be possible.
Gravity in UT3 can't have direction, it always faces into the Z-axis.
fatbob
02-02-2009, 05:14 PM
Yep, this is officially the new White Viewport question.
Sorry if its in the wrong place, I did a search and this is the thread that most matched my question. :)
I'll say 0_o
Source can't do it well either, although taking a look at Portals portals may reveal something. UT2004, and UT can however fake it with clever use of Warp Zones (portals). These don't exist in UT3, so the only other technique is going to need a lot of code - either using rotating rooms (only works in singleplayer, and prevents you using any 'moving' parts or complex geometry) - or you can use a REALLY code heavy version and start re-writing game objects from the ground up with respect to not using the game 'gravity' direction - which may or may not even be possible.
Gravity in UT3 can't have direction, it always faces into the Z-axis.
Cheers again for your help, its a shame it can't be done, but I have a few other ideas. I don't realy know script so this is about as far as it goes I guess.
Chris :)
Chaaaaaaaalie
06-29-2009, 05:45 AM
Wow, this is weird. But I guess Escher is a pretty popular artist so...
http://www.schmidt-gallery.com/screen_shot_01.jpg
I was thinking it would be a matter of writing a script for some sort of modified gravity volume. I have no idea how I would do it yet, but you guys are making it sound impossible...
fatbob
06-29-2009, 08:58 AM
Hi, just remembered the thread and Chaaaaaaaalie's post made reminded me to post my result, in the end instead of trying to alter the gravity I faked it by instancing the scene a few times and using portals in the scene entrances and exits to give the impression that you were changing gravity well, when instead you were actually being warped to an identical, but rotated version of the scene.
Heres a few screen shots in game of the demo.
http://i71.photobucket.com/albums/i150/fatbobalot/1-Relativity-1.jpg
http://i71.photobucket.com/albums/i150/fatbobalot/2-LeapofFaith.jpg
http://i71.photobucket.com/albums/i150/fatbobalot/3-WalkingonTheCeiling.jpg
http://i71.photobucket.com/albums/i150/fatbobalot/4-TheGallery.jpg
http://i71.photobucket.com/albums/i150/fatbobalot/5-SuckingIntoaPortal.jpg
Heres a video of gameplay for the demo level.
http://www.youtube.com/watch?v=KEZ3JgTgSss
The quality is a bit low on the vid, I need to capture a better one at some point but the priority was getting it done for the degree, which I managed to get a 1st in. It also won first prize in the graduate exibition acouple of months back, judged by industry people from the various UK devs. :)
Thanks alot, Chris.
Chaaaaaaaalie
06-29-2009, 12:58 PM
Wow Chris. You really pulled it off. I will leave this project in your capable hands . I really like how you managed the outside bits, having them just wash out with light.
I still think it would be cool if one could actually get the gravity to work in different directions, and have a multiplayer game in there.
I will update if I figure anything out.
Powered by vBulletin® Version 4.1.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.