Git Product home page Git Product logo

Comments (6)

CrossroadInTheVoid avatar CrossroadInTheVoid commented on June 11, 2024 1

Oh, it was switched off in config. Thank you. And sorry for disturbing, take my questions as «dumb user test» for your project.

from 3dreamengine.

Luke100000 avatar Luke100000 commented on June 11, 2024

Welcome back!

The physics has been extracted into its own extension: https://3dreamengine.github.io/3DreamEngine/docu/extensions/physics

Specifically this is how to create a shape (the prepared collision mesh) and world:add (which then creates an collider)

--create a shape from this object and it's current transformation
local shape = physics:newObject(object)

--add this shape to the world
local collider = world:add(shape, "dynamic", x, y, z)

from 3dreamengine.

CrossroadInTheVoid avatar CrossroadInTheVoid commented on June 11, 2024

Thanks. But:
Error: extensions/physics/world.lua:261: attempt to index field 'physics' (a nil value)
Where is the creation of love.physics table?

from 3dreamengine.

Luke100000 avatar Luke100000 commented on June 11, 2024

Either in the conf.lua https://love2d.org/wiki/Config_Files or you can require it manually love.physics = require("love.physics")

from 3dreamengine.

CrossroadInTheVoid avatar CrossroadInTheVoid commented on June 11, 2024

And some more questions.
Method moveTo removed. So, how to move collider to vec3 coordinates? I guess applyForce or applyLinearImpulse are not the best way.
I've used colliders to detect mouseclicks at mobs and raycasts between mobs. Looks like it's not good choice for such a thing now and I should use RaytraceMesh?

from 3dreamengine.

Luke100000 avatar Luke100000 commented on June 11, 2024

Yes, use raytracing for that. The physics extension is 2.5D and is based on Box2d. Setting position is an oversight from me, will add that, but it boils down to collider:getBody():setPosition(x, z) and collider.y = y where body is a love2d physics body.

from 3dreamengine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.