MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 19 Aug 2012 06:26 PM |
| So I've got a little project I'm working on that has to do with "gravity". It would be great if you guys could give suggestions on how to do this. I had my own ideas that _would_ have worked if it weren't for Roblox's Humanoids being so stubborn about which direction they stand up. I don't mean things like Oysi's Gravity Cube, I need to actually change the direction the humanoid stands up without compromising how the player plays or keeping the character animations from working. I've seen similar things done with "Planet Walker" places, though I heard the glitch used for that has been patched. You guys know anything about this kind of thing? |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2012 06:32 PM |
the force on one thing towards another is (not the force between them)
local G=6.673e-11 local function force(thing1,thing2) return G*thing2:GetMass()/(thing1.Position-thing2.Position).magnitude^2 end |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 19 Aug 2012 06:34 PM |
| I meant more along the lines of getting the humanoid to stand up in a different direction, but this will help too. Thanks. |
|
|
| Report Abuse |
|
|
|
| 19 Aug 2012 06:44 PM |
I think that with Oysi's gravity cube, it's the environment which is changing, not the humanoid :P I suppose you could achieve this the roblox way with an extremely strong BodyGyro, and a BodyForce with an extra 192.6 maxforce on the Y to compensate gravity. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 19 Aug 2012 07:46 PM |
| Yes, it is the box turning, not the person. I tried a BodyGyro, but the humanoid would send the character into "tripped" mode when the torso gets flipped about 45* to the side. |
|
|
| Report Abuse |
|
|
TaslemGuy
|
  |
| Joined: 10 Jun 2009 |
| Total Posts: 12174 |
|
|
| 19 Aug 2012 08:17 PM |
| You can't get humanoids to turn like they should. Try making a pseudoplayer. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 20 Aug 2012 10:29 AM |
@Taslem
Is pseudo something 'not real'? |
|
|
| Report Abuse |
|
|
HotThoth
|
  |
 |
| Joined: 24 Aug 2010 |
| Total Posts: 1176 |
|
|
| 20 Aug 2012 12:46 PM |
Yup; until and unless there is an option to change the direction of gravity in the engine, you really have only three choices that I can see.
1.) Rotate the world around your character (only one person will be able to change gravity at a time, and this is pretty awful). 2.) Create a "pseudocharacter"; basically create a new character yourself which jumps, stands straight, etc. all in Lua code... this is probably worse than #1. 3.) Use the normal character, but change the graphics and behavior as much as possible, while keeping the original character's parts invisible. This is basically how the LegoHeroFactory animation system works, but you'd have to also add in camera code (so the camera rotates with the character) and jumping code (so the character can jump at an arbitrary direction). Turning the character to an angle wouldn't be that tricky, since the visible character is basically composed onto the invisible character by only a single weld, so you'd only have to change one weld to rotate the whole character visually (physically it'd still be in the same place, straight up and down). This one's probably your best bet if you want multiplayer.
- HotThoth
|
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 12:58 PM |
@HotThoth
You see, if we had local parts, we wouldn't need tricky hacks. D8< |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 01:00 PM |
| I honestly don't get why we shouldn't have local parts. They're great for making level-based games, or cutscenes, or vehicle/gun/character selection screens. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 20 Aug 2012 02:11 PM |
'local G=6.673e-11 local function force(thing1,thing2) return G*thing2:GetMass()/(thing1.Position-thing2.Position).magnitude^2 end'
').magnitude^2'
What does the magnitude have to do with force? If the 2 parts are further away, force is more?
lol |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 02:21 PM |
There IS a way to create localparts :DDDD Insert the parts into the localcamera ._. |
|
|
| Report Abuse |
|
|
Wobious
|
  |
| Joined: 17 Jan 2012 |
| Total Posts: 135 |
|
|
| 20 Aug 2012 02:22 PM |
>What does the magnitude have to do with force? If the 2 parts are further away, force is more?
dont mess with toomanyxsmonkeytoomanyxs, he's like oysi but with more x's |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 02:23 PM |
MrChickens; He's talking about OFFICIAL local parts.
☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☜☆☞▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ - Candymaniac, a highly reactive substance. |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 02:27 PM |
| That reminds me, I oughta begin making that game that is played entirely in Play Solo. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 20 Aug 2012 05:15 PM |
| Hot, thanks for the help. I think your third suggestion is probably the best. I'll look into it and see what I can pull off. Thanks. |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2012 05:24 PM |
| The force between the two objects is inversely proportional to the square of the distance between them. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Aug 2012 06:32 PM |
| Okay so now I need to work with the camera so it changes with the character. I know how to use :SetRoll() to get the camera angled with the character by setting it to scriptable. Problem is that in this mode it no longer follows the CameraSubject and the player cannot move/zoom the camera with the mouse/I&O. (Roblox should really make :SetRoll() usable in any mode. -_-) Is there any way I can achieve these function using a Local Script? |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Aug 2012 07:44 PM |
Bump.
Any suggestion on how I can do this? |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 08:06 PM |
Closest I've seen to making pseudoplayers that change with gravity is this: http://www.roblox.com/Gravitational-Button-item?id=53639608 As for making bricks fly in different directions, there's this one script I made long time ago: http://www.roblox.com/Modular-Zero-Gravity-Brick-item?id=68611898 |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Aug 2012 08:19 PM |
That Gravitational Button is great! I'm so going to gut that script to find how it works.
Problem is, the question of the camera still stands. How can I change :SetRoll() without losing the players ability to control the camera? :SetRoll() can only be used with the camera set as Scriptable... Is there anyway to replicate player camera controls? |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 22 Aug 2012 08:23 PM |
I don't even want local parts. I want local rendered parts.
As for anything of this magnitude, it'd almost be easier out-side of ROBLOX. |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 22 Aug 2012 08:27 PM |
Well yeah, because Roblox is made to work on one plane.
(What brought up local parts?) |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 08:35 PM |
| What's with the new "SpecificGravity" property P_P |
|
|
| Report Abuse |
|
|
|
| 22 Aug 2012 08:37 PM |
"Specific gravity is the ratio of the density (mass of a unit volume) of a substance to the density (mass of the same unit volume) of a reference substance."
It controls the density of a brick, and influences its behaviour in water. |
|
|
| Report Abuse |
|
|