1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 17:19:56 +00:00
Commit graph

210 commits

Author SHA1 Message Date
Chris Robinson
3fa65f21dd Use a proper cone shape with a contact test to check for melee hits 2013-08-23 12:27:40 -07:00
Chris Robinson
f5d03a16c1 Rename getFacedObject and getFacedHandle for melee hits 2013-08-23 12:27:39 -07:00
Chris Robinson
602be9bbe7 Avoid swimming into the air from underwater 2013-08-21 07:24:54 -07:00
Chris Robinson
9f09bb6f6f Use separate inputs for swimming and flying 2013-08-21 07:24:54 -07:00
Chris Robinson
a546ace94d Remove an unused method 2013-08-21 07:24:54 -07:00
Chris Robinson
1a9672e31b Don't update player physics more than 60 times a second
Bullet and/or our collision handling code doesn't like timesteps much
smaller than that. Ideally we should do physics in 60fps (or even 30fps)
steps and use prediction and interpolation to get more, but that's not
straight forward and needs a fixed timestep loop to lock physics and
logic together.
2013-08-20 11:31:49 -07:00
Chris Robinson
d9040df9d6 Increase the max number of physics iterations
Should help with highly tessellated collision meshes with high
framerates.
2013-08-20 04:41:52 -07:00
Chris Robinson
a17997a973 Continually add bits of input velocity to inertia when falling 2013-08-20 02:10:18 -07:00
Chris Robinson
48e594b7c4 Improve stepping down when starting on the ground 2013-08-19 08:09:23 -07:00
Chris Robinson
1aa92067c2 Fix tracing down 2013-08-19 04:56:02 -07:00
Chris Robinson
7770203dff Some physics cleanup
Gets rid of some unneeded/unused variables, and halves the 'on ground'
offset.
2013-08-18 08:24:39 -07:00
Chris Robinson
8c3564326e Improve movement inertia
Handles all 3 axis. Incoming velocity is only added to inertia when
leaving the ground, and does not continually add to it.
2013-08-18 05:38:50 -07:00
Chris Robinson
9d56e2d86d Apply movement by queueing it to do later 2013-08-17 22:34:38 -07:00
Chris Robinson
96bab88da6 Add physics methods to queue and apply movements 2013-08-17 07:48:45 -07:00
Chris Robinson
0481e64b02 Fix tracing down 2013-08-17 05:09:34 -07:00
Chris Robinson
8bcce0fb55 Clean up the trace struct 2013-08-17 05:09:33 -07:00
Chris Robinson
62c7b3698d Get rid of the old newtrace method 2013-08-17 05:09:33 -07:00
Chris Robinson
65ce3c6ba5 Use a better method to do actor physics traces 2013-08-17 05:09:32 -07:00
Chris Robinson
d82f54c771 Improve actor movement collision handling 2013-08-17 05:09:30 -07:00
Marc Zinnschlag
41b2fa985b silenced some warnings 2013-08-03 15:26:53 +02:00
Marc Zinnschlag
9123afa863 Merge remote-tracking branch 'gus/MeleeCombat2' 2013-08-03 15:23:36 +02:00
gus
a23e7fac93 clean up 2013-08-03 13:58:16 +02:00
gus
c8bb32c40d small maths correction 2013-08-03 12:29:18 +02:00
gus
a25ee360dc use angles and GMST. not sure this work as it should 2013-08-03 12:16:51 +02:00
gus
830762722d first attempt: hit detection with a sphere (not finished) 2013-08-03 11:26:36 +02:00
scrawl
7dc30a01cd Some changes suggested by cppcheck 2013-07-31 18:46:32 +02:00
scrawl
04b90b7d14 Other actors no longer collide with an actor that has collision disabled 2013-07-30 22:00:48 +02:00
Chris Robinson
6195062d72 Try to figure out what gets hit
This isn't the greatest. The distance multiplier is a guess, and a sphere cast
may be better.
2013-07-25 12:58:43 -07:00
scrawl
c81b852071 Fixes inaccurate ray casts; rely on getCameraToViewportRay 2013-07-15 00:39:37 +02:00
scrawl
c41f119ba6 Added new game button 2013-05-15 17:54:18 +02:00
gus
603af21715 little interface improvement 2013-05-07 19:42:21 +01:00
gus
a328a03bd3 more fix. Fargoth quest almost work as in vanilla now. 2013-05-07 19:35:10 +01:00
gus
006f25d1c0 First try to improve AI. Does not work yet due to strange bug in physicsystem 2013-05-06 00:46:50 +01:00
scrawl
627c3fdb6b Added GetStandingPC, GetStandingActor; Fixed GetStartingPos 2013-05-01 11:15:43 +02:00
scrawl
1420a2cb33 Tweaked adjustPosition. Now uses a very thin box for tracing the feet only. 2013-04-30 20:43:38 +02:00
scrawl
91c89e5db4 Use sphere cast instead of ray for camera distance adjustment; use the box orientation value in newtrace 2013-04-30 20:26:59 +02:00
Chris Robinson
d17e1e83d5 Rename MWRender's Player to Camera 2013-04-29 05:50:40 -07:00
Chris Robinson
24e503330b Merge remote-tracking branch 'zini/master' into animations 2013-04-28 09:41:31 -07:00
scrawl
9343b4459e Opening doors 2013-04-28 14:59:15 +02:00
Chris Robinson
ce7bc20fa1 Avoid special-casing player rotation 2013-04-28 01:14:58 -07:00
scrawl
ebaf80d539 Trace actors onto the ground after load, when moved to a different cell by the console or on player cell change. 2013-04-03 23:55:57 +02:00
scrawl
84afd87321 Placeable objects should not collide unless they have a NiRootCollisionNode 2013-03-14 03:04:02 +01:00
scrawl
d7c4a622cf Create a separate rigid body / shape with full details for raycasting, remove the occlusion query hack 2013-03-08 23:46:25 +01:00
Marc Zinnschlag
7e100c36b5 Merge remote-tracking branch 'gus/AI' 2013-03-06 19:05:55 +01:00
gus
8b6f0e0770 Correct orientation sign 2013-03-05 18:28:57 +00:00
gus
48b3f1e0cf Clean up. But still a little hacky 2013-03-04 12:08:35 +00:00
gus
7fb2ff18a3 Fix bug induced by previous commit (player orientation wasn't stored correctly), and fix NPC not beeing able to move with certain angles (like angle Z 70) because the trace function was hitting NPC own hitboxes. The solution prposed here is a little hacky, but i works. Need a little clean up(mBody shouldn't be public) 2013-03-03 13:06:45 +00:00
Nathan Jeffords
109dff2d29 renamed high level NIF files... 2013-03-02 13:23:09 -08:00
scrawl
cd68012498 Z-up conversion: raycasts 2013-02-26 14:28:35 +01:00
Chris Robinson
90cb9ee0ac Don't set a vertical velocity when on the ground 2013-02-23 16:30:11 -08:00
Chris Robinson
4eb8ea0c95 Fix stepping and vertical force accumulation 2013-02-20 07:51:36 -08:00
Chris Robinson
b14def7c09 Set the character as being on the ground when colliding with a shallow enough slope 2013-02-20 05:24:38 -08:00
Chris Robinson
fe6fa9ebe7 Simplify newtrace a bit 2013-02-20 04:14:52 -08:00
Chris Robinson
5d55b41714 Remove a now-unneeded(?) hack 2013-02-19 04:59:38 -08:00
Chris Robinson
89fabdb3a9 Update the PhysicActor's RigidBody when moving
This works, but is less than ideal. As it is now, the rigid body gets updated
twice as the position and rotation are set separately. They should instead be
updated together.
2013-02-19 04:18:15 -08:00
Chris Robinson
a510adc572 Allow stepping when not being affected by gravity 2013-02-19 02:25:57 -08:00
Chris Robinson
c694161272 Don't try to step if not on the ground 2013-02-19 01:28:02 -08:00
Chris Robinson
c965bd8e18 Increase step size to 30 2013-02-15 17:22:55 -08:00
Chris Robinson
c57001e3bd Remove an unused field 2013-02-15 05:11:06 -08:00
Chris Robinson
18b606fddf Use the PhysicActor's set/getOnGround method 2013-02-14 20:10:04 -08:00
Chris Robinson
15dc82f454 Increase step size to 15 2013-02-14 18:59:05 -08:00
Chris Robinson
a729b1b12a Snap to the ground after moving
Depends on two factors:
* End up close enough above to a walkable plane (it's within sMaxStep units
  down and is angled sMaxSlope or less)
* Started out on the ground without any upward movement

This also reduces the distance needed to be to the ground to 4 (from 10), and
ensures the actor is 2 units above the ground when on it. Downward force is
also removed when starting on the ground.
2013-02-14 18:34:51 -08:00
Chris Robinson
f5afa43db5 Remove an unneeded parameter 2013-02-07 17:45:41 -08:00
Chris Robinson
d47d2216f2 Use some const references where appropriate 2013-02-07 16:33:44 -08:00
Chris Robinson
cbdd459500 Remove unneeded playerMove from PhysicActor 2013-02-07 15:48:41 -08:00
Chris Robinson
ca6f8b6d88 Reorganize a bit of code in the movement solver 2013-02-07 13:18:16 -08:00
Chris Robinson
fe0e6c452d Remove the unneeded playerMove object from PhysicsSystem 2013-02-07 12:11:10 -08:00
Chris Robinson
8de2d24d0e Restore old ground check 2013-02-06 21:57:59 -08:00
Chris Robinson
e577ee2de8 Add a method to set/retrieve being on the ground 2013-02-06 21:44:58 -08:00
Chris Robinson
dfd16c4424 Fix movement rotations 2013-02-06 12:39:26 -08:00
Chris Robinson
9cf30f39bd Don't apply gravity when swimming 2013-02-05 19:45:51 -08:00
Chris Robinson
e217a3d25c Silence some console spam 2013-02-05 15:51:26 -08:00
Chris Robinson
ee3764e9b3 Increase max slope to 60. 45 is too low. 2013-02-05 15:07:48 -08:00
Chris Robinson
8c0bb1ff4d Rotate movement in the movement solver 2013-02-05 14:02:14 -08:00
Chris Robinson
2c39760bd5 Move the movement solver code to mwworld's physics system 2013-02-05 12:45:10 -08:00
Chris Robinson
0a4568bd11 Move the PtrMovementList typedef to MWWorld
Use it for the doPhysics parameter, too
2013-02-05 11:03:39 -08:00
Chris Robinson
2cdda96798 Clear out some unneeded doPhysics stuff 2013-02-05 10:23:26 -08:00
Nathan Jeffords
0108be2e4f updated MWWorld::PhysicsSystem::getFacedXXX functions
* changed the names and return values to be consistent
 * made the distance to search a parameter
 * change the distance returned to world units instead of percentage of query distance
2013-01-07 23:00:00 -08:00
emoose
7a7825577a Changed: use MWWorld::Ptr for PhysicsSystem arguments 2012-11-05 19:37:27 +00:00
emoose
4a9821dc65 fix kdevelop indentation... 2012-11-02 20:43:07 +00:00
emoose
15f972cc62 fixes: compile: cast error; doors: key id case comparison; character creation: going from CharacterCreation to BirthDialog loses data; character creation: Class/Race/BirthDialog allowing no data; code: clean up a bit
todo: going from CharacterCreation back to CreateClassDialog loses data
2012-11-02 20:33:08 +00:00
greye
18cc435aa1 resolving conflicts 2012-09-21 13:13:11 +04:00
greye
7606ebafd6 resolving conflicts, minor update 2012-09-17 11:37:50 +04:00
Jason Hooks
192d634098 Movement keys; View angles 2012-09-16 13:19:38 -04:00
Jason Hooks
76f2a82884 More pmove stuff; Turned off broadphase, we could not fall in exteriors 2012-09-15 22:48:24 -04:00
Jason Hooks
f586f53a42 positioning 2012-09-15 16:45:50 -04:00
Jason Hooks
02bca98e9f Setrotate working 2012-09-15 13:23:49 -04:00
Jason Hooks
a1a7733730 Set scale implemented 2012-09-12 18:30:32 -04:00
Jason Hooks
23777033fd Starting to implement new PhysicActor 2012-09-05 17:44:11 -04:00
Jason Hooks
2efceba1fc Tearing apart PhysicActor 2012-09-03 20:32:20 -04:00
Jason Hooks
0697c7f7f4 Finally merged in master 2012-09-01 17:28:12 -04:00
Marc Zinnschlag
1da56e2832 removed some unused variables 2012-08-17 15:37:14 +02:00
greye
4f10138a04 using real player sight angles on ray cast 2012-08-17 15:20:57 +04:00
greye
6961830efb using real player eye direction when moving 2012-08-17 15:19:44 +04:00
greye
fe1a9ac3c5 poor camera with some fixes 2012-08-17 15:19:43 +04:00
Jason Hooks
8762f4a47a boxrotation nif field; commented functions 2012-08-15 16:47:26 -04:00
Jason Hooks
7b8b4c366d Set angle now working for npcs and creatures 2012-08-14 20:29:48 -04:00
Jason Hooks
1f5bc229e0 Separate adjustRigidBody function 2012-08-14 18:04:58 -04:00
Jason Hooks
e7329d5f8b Creatures now have a properly positioned box shape 2012-08-12 00:36:49 -04:00
Jason Hooks
083e3537b4 post merge 2012-08-09 17:21:59 -04:00