Jump to content

  • Log In with Google      Sign In   
  • Create Account

Fs02

Member Since 04 Feb 2013
Offline Last Active Today, 09:32 AM

Topics I've Started

Free running physics

12 November 2014 - 10:21 AM

Hi, i'm trying to achieve some free running movement, but i don't know how it works and where to start. i'll start with the following questions

How free running is implemented in game like Assasins Creed, Watch Dog etc ?

is they are using capsule collider for physics ? if yes, how the capsule collider would behave when it's doing the free running moves ?

Some example or visualization will really help, Thanks :)


controlling chipmunk joints

01 July 2014 - 07:24 PM

Hello, i'm working on a project using cocos2d-js and chipmunk and gut stuck on how to control chipmunk joint, i'm very new on chipmunk physics but i've already familiar with box2d before.

I'm looking for example about how to manipulate chipmunk joints, not just how to create it but also how to control it, i've found some examples before but it just showing how to create a joint, not how to control it.
It'll be very helpfull if someone write an example or give a link to an example.

Thanks very much :-)

What do you thinks about Torque3D ?

20 December 2013 - 09:44 AM

i'm thinking to learn Torque3d because it licensed under MIT and i'd like to know what do you think ? or maybe another suggestion about another open source engine ? thank you :)


Why destructor is not called ?

27 April 2013 - 08:02 AM

Hi, i'm making a simple top down shooter game which have bullets entity, my problem is the bullet entity dtor is not called when i call the delete operator.

here's some of my code :

 

CBullet.hpp

namespace CEntity
{
	class CBullet
	{
	private:
		b2Body* m_Body;
	public:
		CBullet(b2World* world, const b2Vec2& normal, const b2Vec2& pos, float rot);
		~CBullet();
	};
}

 

CBullet.cpp

 

CEntity::CBullet::CBullet(b2World* world, const b2Vec2& normal, const b2Vec2& pos, float rot)
{
//
    fixDef.filter.categoryBits = CEntity::BULLET;
    m_Body->CreateFixture(&fixDef);
//
    m_Body->SetUserData(this);
    
}

CEntity::CBullet::~CBullet()
{
	m_Body->GetWorld()->DestroyBody(m_Body);
}

 

Cgun (responsible for creating the bullet with new operator)

 

void CEntity::CGun::shoot(const b2Vec2& normal, const b2Vec2& pos, float rot)
{
//
   new CEntity::CBullet(m_World, normal, pos, rot);
//
}

 

ContactListener (where the deletion should occur)

 

	void EndContact(b2Contact* contact)
	{
		b2Fixture* fixA		= contact->GetFixtureA();
		b2Fixture* fixB		= contact->GetFixtureB();
		
		if (fixA->GetFilterData().categoryBits	== CEntity::BULLET)
		{
			delete static_cast<CEntity::CBullet*>(fixA->GetUserData());
		}

		if (fixB->GetFilterData().categoryBits	== CEntity::BULLET)
		{
			delete static_cast<CEntity::CBullet*>(fixB->GetUserData());;
		}
	}

 

that's all, im using box2d by the way, any help would be apreciated :)

Surya 

 

PS: Sorry for my bad english


How do you manage two vector from two different api's(Box2D and SFML)

27 March 2013 - 09:31 AM

Hi, i'm using box2d and sfml and i have two different vector here (b2vec2 and sf::Vector2f).

 

I'm trying to combine two vector type in my game classes, what i've done now is making my own game vector utility whit all basic vector operation and casting ability to b2vec2 and sf::Vector2f and it's to far from efficient since i no longer able to pass the vector by pointer or refference and must pass it using value which expensive operation.

 

i'm also thinking about make b2vec2 as my global vector for game objects and create a converter for convert it to sfml if it needed sometime.

 

any advice or example's on how you manage this ?

 

thanks smile.png


PARTNERS