Sonic and Sega Retro Message Board: [1.0 Final] Hedge Physics - 3D Sonic Engine on Unity. - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

[1.0 Final] Hedge Physics - 3D Sonic Engine on Unity. Also, it's Open source.

#31 User is offline Just-in 

Posted 05 February 2017 - 07:05 AM

  • Posts: 3
  • Joined: 17-July 16
  • Gender:Male
I have been wanting something like this forever! Thank you so much! :)
I am finally being able to make my own Sonic games in Unity as perviously all I have made is silly games based off of other games e.g Floppy Sports is a silly ragdoll version of real and fake sports.

But really this kind of thing deserves a lot more attention but at least it has more attention than any of my games (lol)

#32 User is offline LakeFeperd 

Posted 26 April 2017 - 05:06 AM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
https://drive.google...export=download

Here's a test stage and a preview of the final version of hedge physics.
Don't bother pointing out bugs as I know most of them and I'm in the process of fixing them but I'm mostly posting this for the controls, how does it feel?
Camera needs more polish as well, and it will get it over time.

#33 User is offline Amnimator 

Posted 27 April 2017 - 07:16 AM

  • Posts: 186
  • Joined: 15-April 13
  • Gender:Male
All in all, I feel analog sensitivity for controllers should be less. It should be even less when moving at slow speeds. An idea is to have turn sensitivity be dynamic with player speed. I also found my self having to wrestle with the free cam.

Also, found a piece of code that can potentially break things in the slope detection script:

transform.rotation = Quaternion.FromToRotation(Vector3.up, GroundNormal);

I was doing slope detection in Unity too, and you have to be careful about what's going on. By asking from Vector3.up to ground normal, your code will break at a slope of exactly 180 around the forward axis, or at least when you can't specify which way the angle calculation goes. I emphasize this because you likely can't replicate this with a model import from Blender. Floating point precision and all makes it so 90 degrees in Blender is something along the lines of 89.99999. I haven't tested this out in HedgePhysics, but came into a similar issue in another project:
You're asking Unity to take 2 Vector3s and calculate the angle between them. Thing is, say we have a Vector direction of (0,0,1) and our current Vector direction is (0,0,0). How would we rotate between them? You can't specify whether you just want to turn around or do a back flip on your head. Whenever something like this happens, Unity will wrestle with the 2 results and basically just break Slope detection at that point. This part is just me spit-balling but this can also explain why Blitz Sonic has a similar bug at certain angles.
What I'd say would be a fix for this is something along the lines of:

transform.rotation = Quaternion.FromToRotation(transform.up, GroundNormal) * transform.rotation;

Anyway, what this does is take your current slope direction and compares it with the ground normal direction and gets the rotation between them. It then takes your current transform.rotation and applies that on top. Quaternion multiplication really just means to rotate by this. Something to also note is how Quaternion multiplication is non-commutative, so keep track of multiplication order!

All in all, nice job LakeFepard, HedgePhysics is really looking good.

EDIT: Cleared up clarification a bit and grammar. Sorry mods for the amount of edits I do on my posts :V
EDIT: Super late edit. Removed some incorrect information.
This post has been edited by Amnimator: 20 August 2017 - 01:25 PM

#34 User is offline LakeFeperd 

Posted 30 April 2017 - 11:41 AM

  • Posts: 291
  • Joined: 16-January 11
  • Gender:Male
  • Project:Spark the electric jester
1.0 is out! Check out front page for links.
Posted Image

#35 User is offline Andrew75 

Posted 01 May 2017 - 10:18 AM

  • Technical Artist
  • Posts: 1807
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
I haven't played this yet, but in regards to controls and sensitivity, are there options to adjust that exposed in an options menu? Plus if adding sensitivity vs speed , I think being able to adjust how that works in options would be a good way to play test to get something comfortable for the player.

#36 User is offline BlazeHedgehog 

Posted 04 May 2017 - 08:03 AM

  • A "Community Enigma"?
  • Posts: 1395
  • Joined: 23-January 05
  • Gender:Male
  • Wiki edits:51
Maybe it's just a feature of the test level, but when the camera is scripted to switch to another angle, it's way too fast and incredibly disorienting.

#37 User is offline Violet 

Posted 13 May 2017 - 04:26 PM

  • Posts: 150
  • Joined: 14-June 16
  • Gender:Male
  • Location:Sweden
  • Project:Flicky Engine, Overdrive
@LakeFeperd Is there any way to remove the weird camera shake when you perform a spindash?

#38 User is offline Felik 

Posted 14 May 2017 - 02:26 AM

  • Posts: 1564
  • Joined: 11-April 10
  • Gender:Male
  • Wiki edits:1

View PostViolet, on 13 May 2017 - 04:26 PM, said:

@LakeFeperd Is there any way to remove the weird camera shake when you perform a spindash?

I'm pretty sure there is considering it's an opensource engine

  • 3 Pages +
  • 1
  • 2
  • 3
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users