<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — ageia physX force freezing?]]></title>
		<link>https://gprogs.com/viewtopic.php?id=264</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=264&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in ageia physX force freezing?.]]></description>
		<lastBuildDate>Fri, 03 Aug 2007 09:51:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: ageia physX force freezing?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1073#p1073</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (kimgar)]]></author>
			<pubDate>Fri, 03 Aug 2007 09:51:55 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1073#p1073</guid>
		</item>
		<item>
			<title><![CDATA[ageia physX force freezing?]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1072#p1072</link>
			<description><![CDATA[<div class="codebox"><pre><code>SuperStrict
Framework Irrlicht.Core
Import &quot;PhysX_func.bmx&quot;

Global fX:Float = 0
Global fY:Float = 0
Global fZ:Float = 0
Global force:Float = 1.0

&#039;physic
Local dir:String = CurrentDir()
dir = Replace(dir, &quot;/&quot;,&quot;\&quot;)
pxRegWriteDriverPath(dir.ToCString())

PxCreateWorld(0, &quot;key&quot;)
pxSetGravity(0, 0, 0)
pxRegWriteDriverPath(&quot;C:\Program Files\AGEIA Technologies&quot;.ToCString())

Local device:IrrlichtDevice = IrrlichtDevice.create(EDT_DIRECT3D8,_DIMENSION2DI(800,600),16,False,True)
Local driver:IVideoDriver=device.getVideoDriver()
Local smgr:ISceneManager=device.getSceneManager()

Local receiver:IEventReceiver=IEventReceiver.create(MyEventReceiver.generate)
device.setEventReceiver(receiver)

Type MyEventReceiver Extends IEventReceiver
    Method OnEvent:Int(event:SEvent)

        If event.getEventType()=EET_KEY_INPUT_EVENT
            Local key:Int=event.getKeyInputKey()
            Select key
                Case EKEY_KEY_A
                    fX = -force
                Case EKEY_KEY_D
                    fX = force
                Case EKEY_KEY_W
                    fY = force
                Case EKEY_KEY_S
                    fY = -force
                Return True
            EndSelect
        EndIf
        
        If event.getEventType()=EET_KEY_INPUT_EVENT And event.getKeyPressedDown()=False
            Local key:Int=event.getKeyInputKey()
            Select key
                Case EKEY_KEY_A
                    fX = 0
                Case EKEY_KEY_D
                    fX = 0
                Case EKEY_KEY_W
                    fY = 0
                Case EKEY_KEY_S
                    fY = 0                    
                Return True
            EndSelect
        EndIf

        Return False
    EndMethod

    Function generate:IEventReceiver()
        Return New MyEventReceiver
    EndFunction
EndType

&#039;create camera
Local camera:ICameraSceneNode = smgr.addCameraSceneNodeMAYA()
camera.setPosition(_VECTOR3DF(0,30,-100))

&#039;create light
Local light_node:ISceneNode = smgr.addLightSceneNode(Null, _VECTOR3DF(+100,150,-10), _SCOLORF(1.0, 0.6, 0.7, 1.0), 200.0)

&#039;create sphere
Local sphere_node:ISceneNode = smgr.addSphereSceneNode()

&#039;physX bodies
Local sphereBody% = PxBodyCreateSphere(4, 20)
pxBodySetPosition(sphereBody,0, 0, 0)

While(device.run())
    If (device.isWindowActive())
    
        driver.beginScene(True, True, Null)
        
        sphere_node.setPosition(_VECTOR3DF(pxBodyGetPositionX(sphereBody),pxBodyGetPositionY(sphereBody),pxBodyGetPositionZ(sphereBody)))

        pxBodyAddForce(sphereBody, fX,fY,fZ, 0)
        pxRenderPhysic(60 , 0)

        smgr.drawAll()
        driver.endScene()
    EndIf    
Wend    
    
device.drop()</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (kimgar)]]></author>
			<pubDate>Thu, 02 Aug 2007 13:48:50 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1072#p1072</guid>
		</item>
	</channel>
</rss>
