HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 How do I change back the gravity ? (SOLVED)

View previous topic View next topic Go down 
AuthorMessage
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1198
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: How do I change back the gravity ? (SOLVED)   25/07/15, 05:20 am

Alright so I downloaded the 6.0 compile but as you all know the gravity is... "glitchy as hell"
When flying too fast
When swimming and goes up you literaly fly and when you go down it's tooo fast
when you hit a prey sometimes it fly and when you jump from a mountain you are slow.

Is there a way to change the gravity back to the one who was working?

My code:

MagixObject.h

Code:

#pragma once

#include "Ogre.h"
using namespace Ogre;


#define FRICTION 3
#define GRAVITY 1
#define JUMP_ACCEL 0.4
#define TERMINAL_VEL 800
#define GROUND_THRESHOLD 2

#define ALLIANCE_PLAYER 1
#define ALLIANCE_FRIEND 2
#define ALLIANCE_ENEMY 3

enum OBJECT_TYPE
{
   OBJECT_BASIC,
   OBJECT_ANIMATED,
   OBJECT_LIVING,
   OBJECT_UNIT,
   OBJECT_PLAYER,
   OBJECT_ITEM,
   OBJECT_CRITTER
};
struct HitInfo
{
   unsigned short ID;
   Real hp;
   Vector3 force;
   bool isMine;
   HitInfo(const unsigned short &i, const Real &h, const Vector3 &f, bool iM=false)
   {
      ID = i;
      hp = h;
      force = f;
      isMine = iM;
   }
};

using namespace Ogre;

class MagixObject
{
protected:
   SceneNode *mObjectNode;
public:
   MagixObject();
   ~MagixObject();
   virtual const OBJECT_TYPE getType();
   virtual const Vector3 getPosition();
   virtual SceneNode* getObjectNode();
};

MagixObject.cpp:

Code:
#include "MagixObject.h"

MagixObject::MagixObject()
{
   mObjectNode = 0;
}
MagixObject::~MagixObject()
{
}
const OBJECT_TYPE MagixObject::getType()
{
   return OBJECT_BASIC;
}
const Vector3 MagixObject::getPosition()
{
   if (mObjectNode)return mObjectNode->getPosition();
   return Vector3::ZERO;
}
SceneNode* MagixObject::getObjectNode()
{
   return mObjectNode;
}


Last edited by Witacha on 05/08/15, 02:58 pm; edited 1 time in total
Back to top Go down
http://witacha-asukata.deviantart.com/
Claire
Very Helpful
Very Helpful
avatar

Game username : SoftMoon | MissDiealot
Server : Vaellerios (admin) | Lair of the Wolf (admin) | Journey Kingdom (dev)
Female Posts : 325
Join date : 2015-03-03
Age : 16

PostSubject: Re: How do I change back the gravity ? (SOLVED)   25/07/15, 05:37 am

Try that, tested and the gravity is way better like this.
Though I haven't tested it in the water
Code:
#define FRICTION 3
#define GRAVITY 0.9
#define JUMP_ACCEL 0.3
#define TERMINAL_VEL 800
#define GROUND_THRESHOLD 2
Back to top Go down
http://missdiealot.deviantart.com/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1198
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How do I change back the gravity ? (SOLVED)   25/07/15, 06:32 am

Softie wrote:
Try that, tested and the gravity is way better like this.
Though I haven't tested it in the water
Code:
#define FRICTION 3
#define GRAVITY 0.9
#define JUMP_ACCEL 0.3
#define TERMINAL_VEL 800
#define GROUND_THRESHOLD 2


Ah nope still the same :/
Back to top Go down
http://witacha-asukata.deviantart.com/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1198
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How do I change back the gravity ? (SOLVED)   28/07/15, 04:39 am

Anyone? ^^
Back to top Go down
http://witacha-asukata.deviantart.com/
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: How do I change back the gravity ? (SOLVED)   28/07/15, 11:38 am

I used kdiff between 6.0 and an old source

essentially gravity and jump accel? get changed, there are a couple lines of gravity then I replaced the entire physics chunk

but yeah, ctrl:f and kdiff are you friends. Search the code for GRAVITY, kdiff or just replace the lines and eventually you should have the original gravity system

________________________________
Back to top Go down
http://azoptaos.boards.net/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1198
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How do I change back the gravity ? (SOLVED)   29/07/15, 06:05 am

Hyper wrote:
I used kdiff between 6.0 and an old source

essentially gravity and jump accel? get changed, there are a couple lines of gravity then I replaced the entire physics chunk

but yeah, ctrl:f and kdiff are you friends. Search the code for GRAVITY, kdiff or just replace the lines and eventually you should have the original gravity system

Oh yeah completly forgot about kdiff XD thanks hyper !
Back to top Go down
http://witacha-asukata.deviantart.com/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1198
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How do I change back the gravity ? (SOLVED)   04/08/15, 10:51 am

Ok so i tried to change it back to the original gravity but it doesn't work at all, i have no idea what to add/edit.
Hyper: is there a way you could explain it to me if it doesn't bother you? I mean how to change back the original gravity into 6.0?
Back to top Go down
http://witacha-asukata.deviantart.com/
Hyper
Admin
avatar

Game username : Hyper
Server : Azoptaos
Male Posts : 483
Join date : 2014-02-09
Age : 19

PostSubject: Re: How do I change back the gravity ? (SOLVED)   05/08/15, 02:17 pm

I can try? I did it a while ago but let's give this a go:

MagixObject.h
Spoiler:
 
MagixPlayer.cpp
Spoiler:
 
MagixUnit.cpp
Spoiler:
 
MagixAnimated.cpp
Spoiler:
 

not sure if I missed anything

________________________________
Back to top Go down
http://azoptaos.boards.net/
Witacha
3D Modeler
3D Modeler
avatar

Game username : Witacha
Server : Land Of The Wolves(Owner)
Female Posts : 1198
Join date : 2012-06-15
Age : 18
Location : France

PostSubject: Re: How do I change back the gravity ? (SOLVED)   05/08/15, 02:57 pm

Oh my god it work
Thank you soooooooooooo much Hyper <3
Back to top Go down
http://witacha-asukata.deviantart.com/
 
How do I change back the gravity ? (SOLVED)
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support :: Solved Support Issues-
Jump to: