Nice it seen to work good.
i checked this out very quickly, your method only produces correct force without rotation, but is a good and correct start.
Yes I have just quickly implement the base because in my system I like to have more bullet models not only raycast. I don't have finish to think about how I implement it in my system this is only a quick test.
In some demos I need real bullet body and some more options, In my case the bullet is not only shot from weapons the bullet can become a fracture object or anythings.
Also, another suggestion, i see you still use old-style operations on vectors in pascal, i'd propose you use operator overloading and methods in records on your vector & matrix structs, it makes vector operations so much cleaner and simplier to use.
Thanks for the suggestion but I don't think to change my vector and matrix stuff.
In my c++ plugin I use glm math lib and it working very good with my current vector&matrix method.
I can share all my maths too with simple pointer glm vs my project.
It can become a very long process to change all everywhere.
I use the old GLScene vector&matrix tools, I have write many helpers for work with this tools.
I prefered to have the vector and matrix record separate from the tools function, I don't like the idea to use it like a record class. My vector and matrix and quaternion is very similar to newton math tools. It is more easy for me to translate the joints code and more from newton sdk to pascal. I use it from 2006 I can't imagine all the changes that I need to do for change it with a other method hehe.
My name is not present in the page but many of my work come from far in time, You can see in this page one of my first project about physics&GLScene.
http://wiki.freepascal.org/GLScene I'm the first with a other GLScene user to have make work GLScene inside lazarus ide.
About bero's for sure he do nice work but like I have say before I'm not so fan about the coding method. I let's it for others.
NewtonBodyApplyImpulsePair seems like poorly undocumented
I never have try the NewtonBodyApplyImpulsePair.
I have already use the normal impulse command but it make very longtime that I don't have use and test it.
I'm not sure if you have see only my bullet code or my sdk for the plugin.
Currently the sdk is not really clean and not so user friendly,
Like I have say I have many projects and I slowly add it all in my plugin sdk.
My current online sdk for the plugin is a very early version.
I have let's it in public anyway because I have some users using my plugin with personal project and they resquested some code to start her project.
If you like to see what is my plugin and how it work, I'm going to out a new sdk version this friday on the night.
I have work to separate the plugin code from the demos, I have do a big refactorization in my code.
What people need to understand about my plugin and my code, The demos is only some exemples for show how to use my plugin.
The cool thing if a user don't like my plugin GL he can use a personal engine and use my demo code as exemple model only.
The user is not in the obligation to use my vector&matrix tools,
The plugin can work with any math tools.
The plugin don't hide anythings to the user, Exemple the plugin have a default camera and mouse pick system.
If the user don't like to use my implementation about cam&mouse, In the sdk I have camera and mouse pick code exemple to let's the user create self method.
PS: In a other forum I have see that you have trouble to build the enet dll.
In the project you need to change the lib option for dll, and take a look to the file name too.
The vs c++ don't rename it to dll by self, You need to rename the .lib to .dll in the project config.
You need to add ENET_DLL flag and you need this lib too WSock32.lib;WS2_32.lib;Winmm.lib
In the general config you need to change Whole Program Optimization for No Whole Program Optimization.
https://sites.google.com/site/evadlevarg/abcd.pngIf you are interested to see my plugin and demos code, Just to take a look this week-end in my youtube you can find my newer sdk version with the refactorization code.