mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Made sitting point more consistant
This commit is contained in:
parent
22bcb7d7e7
commit
e067a013a0
2 changed files with 3 additions and 2 deletions
|
@ -261,7 +261,7 @@ function update(deltaTime){
|
||||||
MyAvatar.position.z != avatarOldPosition.z) {
|
MyAvatar.position.z != avatarOldPosition.z) {
|
||||||
avatarOldPosition = MyAvatar.position;
|
avatarOldPosition = MyAvatar.position;
|
||||||
|
|
||||||
var SEARCH_RADIUS = 5;
|
var SEARCH_RADIUS = 10;
|
||||||
var foundModels = Models.findModels(MyAvatar.position, SEARCH_RADIUS);
|
var foundModels = Models.findModels(MyAvatar.position, SEARCH_RADIUS);
|
||||||
// Let's remove indicator that got out of radius
|
// Let's remove indicator that got out of radius
|
||||||
for (model in models) {
|
for (model in models) {
|
||||||
|
|
|
@ -69,8 +69,9 @@ ModelItemProperties ModelsScriptingInterface::getModelProperties(ModelItemID mod
|
||||||
}
|
}
|
||||||
if (_modelTree) {
|
if (_modelTree) {
|
||||||
_modelTree->lockForRead();
|
_modelTree->lockForRead();
|
||||||
const ModelItem* model = _modelTree->findModelByID(identity.id, true);
|
ModelItem* model = const_cast<ModelItem*>(_modelTree->findModelByID(identity.id, true));
|
||||||
if (model) {
|
if (model) {
|
||||||
|
model->setSittingPoints(_modelTree->getGeometryForModel(*model)->sittingPoints);
|
||||||
results.copyFromModelItem(*model);
|
results.copyFromModelItem(*model);
|
||||||
} else {
|
} else {
|
||||||
results.setIsUnknownID();
|
results.setIsUnknownID();
|
||||||
|
|
Loading…
Reference in a new issue