5/10/2023 0 Comments Physics texpadI think I would love jEdit if I didn't dislike Java so much right now. I used Cream (Vim) briefly, but there was nothing special about it either way. I wouldn't go with Emacs unless, or until, you have time to read and learn before actually needing to use it much. You only need, which you likely already have.)Įmacs seems like it can do anything, but it also seems to take a lot of energy to customize and start using efficiently. The development kit is the runtime environment plus additional stuff (compiler and packages) that you don't need unless you are building Java programs. And don't pay any attention to the mess of acronyms (SDK, JDK, J2SE, etc.). (If you go with jEdit and don't have the necessary runtime environment already, don't use their link to the full development kit. In fact, I've been trying for a while to switch from jEdit to Emacs (for various reasons), but if I'm in any kind of a hurry, I keep going back to jEdit because it's so headache-free to use. The second observation is that the scale on Quake 3 BSPs is 32 units per meter, which means a velocity of -0.1 for gravity is almost neglectible unless you are scalling everything acordingly, try using a bigger number even if right now its a static value and remember gravity on earth has an acceleration of 9.81 m/s² or 32.2 ft/s².If you want an open-source text editor that has tons of cool features and is easy to learn and customize and you don't mind Java, jEdit is great. Ok, 2 observations, one is that your position should really be the center of the character axis alligned box, or the center of its bounding sphere if you are using spheres, this is because the algorithm expects ths to be the case (IE, it uses a radius to determine the bounding volume of the character), the camera position would usually be offset as to be close to he eyes of the model, you may be setting the camera position to be the center of the bounding volume, in such case, just keep it in consideration for later. I know a linear velocity for gravity isnt exactly realistic, but hey, I'd rather make it realistic once its working! This also in this case doesnt really explain why so much work is done when the endpoint=startpoint as this doesnt actually happen! My velocity would be say, 0,-0.1,0 - which means that the endpoint isnt equal to the startpoint. Vector3 position = cameraPosition //Gotten though inverting the view and getting the translation Well, the trace method takes a start point and an endpoint, so i was doing something like I mean it seems to work ok, but I'm open for critisism - but please remember that my maths isnt the greatest, so if you respond with "You should dot the quadrangle of the perpendicular hypotenuse, and then pass that to a Logarithmic algorithm", I may ask for help interpretting it!Ĭheers (PS the above code is c# - not that it should make too much difference to anyone) The reason for this is that if the normal of the plane isĠ,1,0 then acos of that would be 90,0,90 which would indicate that i cant move in the Y direction.ġ: Does anyone know how to avoid the invisible planes (ie the ons that dont have walls or floors)Ģ: Is there anything anyone can suggest as being obviosly wrong above. If it is <5 (the radius of my bounding sphere), then I alter the velocity to the ACos of the normal of the plane. Now What i seem to get it I collide against most some of the rendered walls as i expect, but also hit a few impassible ones too.īasically I get down to the plane level of the BSP (I assume I'm doing it correctly), and then dot the new position against the plane. Now I should point out now that my maths isnt great, so theres probably lots to pick apart here! Velocity = new Vector3((float)Math.Acos()*velocity.X, Int plane = ane įloat dot = Vector3.Dot(position-velocity, Plane.normal) - (Plane.dist) It is based on a course Im teaching at a university in my country plus stuff I know and use in my work and for fun, and will include topics such as linear algebra, calculus, differential equations, statistics and more. Vector3 CheckCollision(Vector3 position, Vector3 velocity)įor (int j = 0 j < leaf.n_leafbrushes j++)īSPLeafBrush leafBrush = LeafBrush įor (int k = 0 k < brush.n_brushsides k++) I recently started a project of writing a book aimed at students learning exact sciences (other than physics - that would be way too much work). I looked about on tih forum and didnt find much, so I knocked this up Ive got a fully working Q3 renderer up and running in XNA and wanted to try to get some collision going.
0 Comments
Leave a Reply. |